Android get the Intent when implementing RecognitionListener

The results should be in the bundle with the key SpeechRecognizer.RESULTS_RECOGNITION.

@Override
public void onResults(Bundle results) {
    if (results != null && results.containsKey(SpeechRecognizer.RESULTS_RECOGNITION)) {
      List<String> resultsList = results.getStringArrayList(SpeechRecognizer.RESULTS_RECOGNITION);
      // most likely result is resultsList.get(0)
    } else {
      // no results
    }

}

See the Android developer documentation for SpeechRecognizer explains it in detail. This method for getting speech recognition results also works for partial results in #onPartialResults

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)