Code example for SpeechRecognizer

Methods: stopListening

0
    } 
 
    @SuppressWarnings("unused") 
    @CalledByNative 
    private void stopSpeechRecording() { 
        mRecognizer.stopListening();
    } 
 
    @SuppressWarnings("unused") 
    @CalledByNative 
    private void cancelSpeechRecognition() { 
        mRecognizer.cancel();
        mSessionId = 0;
    } 
 
    // The following methods are implemented by SpeechInputManagerAndroid. 
    private native void nativeSetRecognitionResults( 
            int sessionId, String[] results);
    private native void nativeDidCompleteRecording(int sessionId);
    private native void nativeDidCompleteRecognition(int sessionId);
}