停止所谓的无效状态:1 [英] stop called in an invalid state: 1
问题描述
我想打造的android通话记录。我现在用的 MediaRecorder
类:
当我的应用程序达到以下行: recorder.stop()
我收到以下错误:
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?
由于提前,
KOBI
推荐答案
从MediaRecorder文件页:
From the MediaRecorder documents page:
http://developer.android.com/reference/android/media/ MediaRecorder.html
看着给出的状态图,你只能叫停止()
在 MediaRecorder
是状态录制
Looking at the state diagram given, you can only call stop()
when the MediaRecorder
is in the state Recording
很难告诉你在做什么错不可code,但你必须要在错误的状态叫停止()
。
Hard to tell what you are doing wrong without code, but you have to be in the wrong state to call stop()
.
这篇关于停止所谓的无效状态:1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!