title: Understanding Voice Recognition Service
body: <p>I am trying to understand the functioning of <a href="http://developer.android.com/reference/android/speech/RecognizerIntent.html" rel="nofollow noreferrer">RecognitionService</a> and <a href="http://developer.android.com/reference/android/speech/RecognitionService.Callback.html" rel="nofollow noreferrer">RecognitionService.Callback</a>. I am pretty new to this framework and would like to know how to call the onStartListening() function in RecognitionService. I saw the post <a href="https://stackoverflow.com/questions/9997720/how-to-register-a-custom-speech-recognition-service/11633783#11633783">How to register a custom speech recognition service?</a> but I had inserted log messages in all the main functions to see which one is being called when.</p>
  
  <p>I have also looked at the sample app in the sdk, but it does a pretty bad job of explaining how things happen. I want to call the startService from an activity. </p>
  
  <p>I use the following intent </p>
  
  <pre><code>Intent startServiceIntent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
      startServiceIntent.setClass(this, SimpleVoiceService.class);
  
      startService(startServiceIntent);
  </code></pre>
  
  <p>Could someone please help me in getting this working. It will be great if someone could point me to a tutorial on this, or a describe the general flow of how to do it.</p>
  
  <p>Thanks a lot.</p>