The results of a speech recognition can be read in the onActivityResult(int requestCode, int resultCode, Intent data)
method, as shown in this example. This method overrides the same method in class Activity
: why is the call to the superclass method not the first statement?
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == VOICE_RECOGNITION_REQUEST_CODE && resultCode == RESULT_OK) {
// Fill the list view with the strings the recognizer thought it could have heard
// ...
}
super.onActivityResult(requestCode, resultCode, data);
}