stop called in an invalid state: 1

泪湿孤枕 提交于 2019-12-23 01:59:29

问题


I am trying to build a call recorder in android. I am using the MediaRecorder Class: When My App reaches the following line: recorder.stop() I get the following error:

stop called in an invalid state: 1

What causes that problem?

Thanks in advance,

kobi


回答1:


From the MediaRecorder documents page:

http://developer.android.com/reference/android/media/MediaRecorder.html

Looking at the state diagram given, you can only call stop() when the MediaRecorder is in the state Recording

Hard to tell what you are doing wrong without code, but you have to be in the wrong state to call stop().



来源:https://stackoverflow.com/questions/11852852/stop-called-in-an-invalid-state-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!