Multiple results for Voice Recognition in Android
<p>Hi I am trying to get multiple values from the Android voice recognition, not just the best one.</p>

<p>I think I have to add one more flag, but I am not used to the android way of doing things.
So far this is what I have: </p>

<p>(thanks)</p>

<pre><code>private OnClickListener mSpeakListener = new OnClickListener(){     
    public void onClick(View v){
        if (v.getId() == R.id.speech) {
            bar.setVisibility(View.VISIBLE);
            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,                          
                     RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
    intent.putExtra(RecognizerIntent.EXTRA_PROMPT, "Speech recognition demo");
    startActivityForResult(intent,0);

}

/**
* Handle the results from the recognition activity.
*/
 protected void onActivityResult(int requestCode, int resultCode, Intent data) {
   if (requestCode == 0 &amp;&amp; resultCode == RESULT_OK) {
       // Fill the list view with the strings the recognizer thought it could have heard
       ArrayList&lt;String&gt; matches = data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);
       StringBuilder sb = new StringBuilder();
       for(String match: matches){
           sb.append(match + ", ");
       }
       questionTextBox.setText(sb.toString());
       Log.d(TAG,"Focus on Button");
       okButton.requestFocus();           
   }
   super.onActivityResult(requestCode, resultCode, data);
</code></pre>

<p>}</p>
