speech recognition in android not working -


i m trying create application in when call comes phone, call must automatically attend or end according user speech command. here m giving tried, m getting error in startvoicerecognitionactivity() method activity not found exception:no activity found handle intent.

   public 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); }  @override protected void onactivityresult(int requestcode, int resultcode, intent data) {     // todo auto-generated method stub      if (requestcode == request_code && resultcode == result_ok)     {         string spch = data.getstringextra(recognizerintent.extra_results);           if (spch.contains("yes"))              {             enablespeakerphone(this);              intent = new intent(intent.action_media_button);             keyevent event = new keyevent(keyevent.action_down,keyevent.keycode_headsethook);             i.putextra(intent.extra_key_event, event );             this.sendorderedbroadcast(i, null);          }          else if(spch.contains("no"))          {             intent buttonup = new intent(intent.action_media_button);              buttonup.putextra(intent.extra_key_event, new keyevent(keyevent.action_down, keyevent.keycode_headsethook));             this.sendorderedbroadcast(buttonup, "android.permission.call_privileged");          }     }     super.onactivityresult(requestcode, resultcode, data); } 

can me find out issue...

have declared activity correctly in manifest file?


Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -