Code example for TextToSpeech

Methods: shutdown

0
    /** 
     * Has to be called in onDestroy of the activity that uses this instance of VoiceOutputAssistant. 
     */ 
    public void onDestroy() { 
        if (mTts != null && isTTSInitialized) {
            mTts.shutdown();
            mTts = null;
            isTTSInitialized = false;
        } 
    } 
 
} 
Contextual code suggestions in your IDE  Get Codota for Java