title: Speech recognition without Google dialog boxes
body: <p>I will try to use the Speech recognition without Google dialog boxes with RecognitionListener
  but does not works only beep when start the application.I have added permissions Audio record and Internet into the manifest file.I hope you tell me and help me to find the wrong...I have not errors on Log cat...I want to make a loop when user say hello a Toast show up a mesage Regognition OK and a list view shows the results.</p>
  
  <pre><code> public  class MainActivity extends Activity  implements RecognitionListener
  {
  
   private ListView wordsList;
  
  private SpeechRecognizer mSpeechRecognizer;
  private Intent mSpeechRecognizerIntent; 
  
  
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      mSpeechRecognizer = SpeechRecognizer.createSpeechRecognizer(this);
      mSpeechRecognizerIntent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
      mSpeechRecognizerIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,
                                       RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
      mSpeechRecognizerIntent.putExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE,
                                       this.getPackageName());
  
      wordsList = (ListView) findViewById(R.id.listView1); 
  
      mSpeechRecognizer.startListening(mSpeechRecognizerIntent);
  
  }
  
  
      public void onBeginningOfSpeech(){ }
  
          public void onBufferReceived(byte[] buffer){ }
  
          public void onEndOfSpeech(){ }
  
          public void onError(int error){
  
             //mSpeechRecognizer.startListening(mSpeechRecognizerIntent);
  
      }
  
      public void onEvent(int eventType, Bundle params){ }
  
  
      public void onPartialResults(Bundle partialResults){ }
  
  
      public void onReadyForSpeech(Bundle params){
  
  
          Toast.makeText(getBaseContext(), "Voice recording starts", Toast.LENGTH_SHORT).show();
  
      }
  
      public void onResults(Bundle results)
      {
  
          ArrayList&lt;String&gt; matches = results.getStringArrayList(SpeechRecognizer.RESULTS_RECOGNITION);
  
  
          wordsList.setAdapter(new ArrayAdapter&lt;String&gt;(this, android.R.layout.simple_list_item_1,  matches));
  
  
          if ( matches.contains("hello") {
  
              Toast.makeText(getBaseContext(), "Recognision OK!!!", Toast.LENGTH_SHORT).show();
  
            }
  
      }
  
      public void onRmsChanged(float rmsdB) { }
  
    }
  </code></pre>