Note that there are some explanatory texts on larger screens.

plurals
  1. PONull Exception During Init of Speech Recognition on Android
    primarykey
    data
    text
    <p>I'm working for the speech recognition for my application and I tried this code and I'm getting the error in my logcat as <strong>intent must not null exception</strong> in android </p> <pre><code> public class SpeechRecognizerActivity extends Activity { /** Called when the activity is first created. */ String a; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); final TextView txt=(TextView)findViewById(R.id.textView1); class MyRecognitionListener implements RecognitionListener { @Override public void onBeginningOfSpeech() { Log.d("Speech", "onBeginningOfSpeech"); } @Override public void onBufferReceived(byte[] buffer) { Log.d("Speech", "onBufferReceived"); } @Override public void onEndOfSpeech() { Log.d("Speech", "onEndOfSpeech"); } @Override public void onError(int error) { Log.d("Speech", "onError"); } @Override public void onEvent(int eventType, Bundle params) { Log.d("Speech", "onEvent"); } @Override public void onPartialResults(Bundle partialResults) { Log.d("Speech", "onPartialResults"); } @Override public void onReadyForSpeech(Bundle params) { Log.d("Speech", "onReadyForSpeech"); } @Override public void onResults(Bundle results) { Log.d("Speech", "onResults"); ArrayList&lt;String&gt; strlist = results.getStringArrayList(SpeechRecognizer.RESULTS_RECOGNITION); for (int i = 0; i &lt; strlist.size();i++ ) { Log.d("Speech", "result=" + strlist.get(i)); } } @Override public void onRmsChanged(float rmsdB) { Log.d("Speech", "onRmsChanged"); } } SpeechRecognizer sr = SpeechRecognizer.createSpeechRecognizer(getApplicationContext()); MyRecognitionListener listener = new MyRecognitionListener(); sr.setRecognitionListener(listener); sr.startListening(RecognizerIntent.getVoiceDetailsIntent(getApplicationContext())); } } </code></pre> <p>Please suggest me, what i'm making mistake or have to set something setting previously in the emulator before running the program. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload