Code example for SpeechRecognizer

Methods: stopListening

0
    } 
 
    @Override 
    protected void onPause() { 
        super.onPause(); 
        sr.stopListening();
    } 
 
    @Override 
    protected void onResume() { 
        super.onResume(); 
        sr.startListening(intent);
    } 
 
    @Override 
    protected void onDestroy() { 
        super.onDestroy(); 
        sr.stopListening();
        sr.destroy();
    }