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

Popular posts from this blog

php - cannot display multiple markers in google maps v3 from traceroute result -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -