【发布时间】:2014-07-30 19:03:49
【问题描述】:
我在 Activity 的 onCreate 中运行以下代码:
Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,
RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
intent.putExtra(RecognizerIntent.EXTRA_PROMPT, "Some String");
startActivityForResult(intent, VOICE_INPUT_CODE);
在语音活动完成之前,我总是在 resultCode 中收到 RESULT_CANCELED 并且语音数据丢失。
谢谢!
【问题讨论】:
标签: android android-activity input voice