android - Galaxy S IV does not have voice recognizer intent? -
i created app uses voice recognition , works on phones on new galaxy s iv , galaxy note ii fails with:
java.lang.runtimeexception: unable start activity componentinfo{<my.pakage.myactivity>/<my.pakage.myactivity>}: android.content.activitynotfoundexception: no activity found handle intent { act=android.speech.action.recognize_speech (has extras) } @ android.app.activitythread.performlaunchactivity(activitythread.java:2247) @ android.app.activitythread.handlelaunchactivity(activitythread.java:2297) @ android.app.activitythread.access$700(activitythread.java:152) @ android.app.activitythread$h.handlemessage(activitythread.java:1282) @ android.os.handler.dispatchmessage(handler.java:99) @ android.os.looper.loop(looper.java:137) @ android.app.activitythread.main(activitythread.java:5328) @ java.lang.reflect.method.invokenative(native method) @ java.lang.reflect.method.invoke(method.java:511) @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:1102) @ com.android.internal.os.zygoteinit.main(zygoteinit.java:869) @ dalvik.system.nativestart.main(native method) caused by: android.content.activitynotfoundexception: no activity found handle intent { act=android.speech.action.recognize_speech (has extras) } @ android.app.instrumentation.checkstartactivityresult(instrumentation.java:1659) @ android.app.instrumentation.execstartactivity(instrumentation.java:1434) @ android.app.activity.startactivityforresult(activity.java:3430) @ android.support.v4.app._holoactivity.superstartactivity(_holoactivity.java:717) @ android.support.v4.app._holoactivity.startactivityforresult(_holoactivity.java:698) @ android.support.v4.app._holoactivity.startactivityforresult(_holoactivity.java:689) @ com.ltandfumbles.soundoff.activites.record.speak(record.java:263) @ com.ltandfumbles.soundoff.activites.record.oncreate(record.java:96) @ android.app.activity.performcreate(activity.java:5250) @ android.app.instrumentation.callactivityoncreate(instrumentation.java:1097) @ android.app.activitythread.performlaunchactivity(activitythread.java:2211) ... 11 more
the code triggers is:
void speak() { intent intent = new intent(recognizerintent.action_recognize_speech); //intent.putextra(recognizerintent.extra_prompt, mettexthint.gettext().tostring()); // given hint recognizer user going //there 2 form of language model available //1.language_model_web_search : short phrases //2.language_model_free_form : if not sure words or phrases , domain. intent.putextra(recognizerintent.extra_language_model, recognizerintent.language_model_web_search); int noofmatches = 3; // specify how many results want receive. results // sorted first result 1 higher confidence. intent.putextra(recognizerintent.extra_max_results, noofmatches); intent.putextra(recognizerintent.extra_prompt, "speak now"); intent.putextra(recognizerintent.extra_speech_input_complete_silence_length_millis, 2000); intent.putextra(recognizerintent.extra_speech_input_possibly_complete_silence_length_millis, 2000); //start voice recognizer activity result. startactivityforresult(intent, voice_recognition_request_code); }
i realize error result of no suitable application on device find hard believe new devices don't have voice recognition capabilities. there change in android 4.2.2 need account for?
please make sure have google voice search installed/enabled.
Comments
Post a Comment