Code example for TextToSpeech

Methods: isSpeaking, shutdown, stop

0
	protected void onDestroy() { 
 
		super.onDestroy(); 
		try { 
			if (mTts != null) {
				if (mTts.isSpeaking()) {
					mTts.stop();
				} 
				mTts.shutdown();
			} 
		} catch (Exception e) {
			PrivateException ex = new PrivateException(e, DaisyEbookReaderBaseActivity.this);
			ex.writeLogException();
		} 
	} 
 
	/** 
	 * Make sure TTS installed on your device. 
	 */ 
	@Override 
	protected void onActivityResult(int requestCode, int resultCode, Intent data) {