Code example for SpeechRecognizer

Methods: stopListening

0
      } 
   } 
 
   public void stopListening() { 
      if (mListening) {
         mSpeechRecognizer.stopListening();
         mListening = false;
      } 
   } 
 
   public void destroy() { 
      mSpeechRecognizer.destroy();
   } 
 
   public void cancel() { 
      mSpeechRecognizer.cancel();
   } 
 
   public void addCommand(String phrase, Command command) {
      mCommands.put(phrase, command);
   }