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

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

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -