Android RecognizerIntent simple destroy -
i use intent voice recognition, here code :
/** * fire intent start voice recognition activity. */ private void startvoicerecognitionactivity() { intent intent = new intent(recognizerintent.action_recognize_speech); intent.putextra(recognizerintent.extra_language_model, recognizerintent.language_model_free_form); intent.putextra(recognizerintent.extra_prompt, "voice recognition demo..."); startactivityforresult(intent, request_code); }
everything works fine. want stop voice recognition after 5 seconds example. can't figure how kill voice recongnition activity.
to kill voice recongnition activity call finishactivity(request_code)
.
need set countdown timer duration of 5 second, in onfinish
call finishactivity(request_code)
. start timer after call startactivityforresult
Comments
Post a Comment