Vote count:
0
I have an activity with two buttons.START AND STOP.On click on start recorder started in a service.On stop it is stopped.But I tried to do it with extending IntentService it is giving me the following errors.
02-03 05:08:54.520: E/AndroidRuntime(21191): FATAL EXCEPTION:
IntentService[MediaPlayerService]
02-03 05:08:54.520: E/AndroidRuntime(21191):
java.lang.IllegalStateException
02-03 05:08:54.520: E/AndroidRuntime(21191): at
android.media.MediaRecorder.start(Native Method)
02-03 05:08:54.520: E/AndroidRuntime(21191): at
com.dummy.MediaPlayerService.startRecorder(MediaPlayerService.java:176)
02-03 05:08:54.520: E/AndroidRuntime(21191): at
com.dummy.MediaPlayerService.onHandleIntent(MediaPlayerService.java:65)
02-03 05:08:54.520: E/AndroidRuntime(21191): at
android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
02-03 05:08:54.520: E/AndroidRuntime(21191): at
android.os.Handler.dispatchMessage(Handler.java:99)
02-03 05:08:54.520: E/AndroidRuntime(21191): at
android.os.Looper.loop(Looper.java:177)
02-03 05:08:54.520: E/AndroidRuntime(21191): at
android.os.HandlerThread.run(HandlerThread.java:60)
asked 37 secs ago
How to stop the recorder in the service?
Aucun commentaire:
Enregistrer un commentaire