android Programming Glossary: startvoicerecognitionactivity
How To: Voice Commands into an android application http://stackoverflow.com/questions/11798337/how-to-voice-commands-into-an-android-application R.id.list Now you will have to set up your voice recognition activity by using the following code. public void startVoiceRecognitionActivity Intent intent new Intent RecognizerIntent.ACTION_RECOGNIZE_SPEECH intent.putExtra RecognizerIntent.EXTRA_LANGUAGE_MODEL.. intent VOICE_RECOGNITION_REQUEST_CODE Next inside your onclick method from step 2 add the activity from step 6. startVoiceRecognitionActivity Next we will have to set up another method. Copy and paste the following code. @Override public void onActivityResult int.. voiceinputbuttons speakButton Button findViewById R.id.btn_speak mList ListView findViewById R.id.list public void startVoiceRecognitionActivity Intent intent new Intent RecognizerIntent.ACTION_RECOGNIZE_SPEECH intent.putExtra RecognizerIntent.EXTRA_LANGUAGE_MODEL..
Can't implement Google API Sample (VoiceRecognition) http://stackoverflow.com/questions/7256079/cant-implement-google-api-sample-voicerecognition not present Handle the click on the start recognition button. public void onClick View v if v.getId R.id.btn_speak startVoiceRecognitionActivity Fire an intent to start the speech recognition activity. private void startVoiceRecognitionActivity Intent intent new.. R.id.btn_speak startVoiceRecognitionActivity Fire an intent to start the speech recognition activity. private void startVoiceRecognitionActivity Intent intent new Intent RecognizerIntent.ACTION_RECOGNIZE_SPEECH intent.putExtra RecognizerIntent.EXTRA_LANGUAGE_MODEL..
|