The TTS engine should be destroyed in the onStop method, not the onDestroy method to prevent it being used in the stopped state.master
} | } | ||||
@Override | @Override | ||||
public void onDestroy() { | |||||
super.onDestroy(); | |||||
public void onStop() { | |||||
super.onStop(); | |||||
if (mTts != null) { | if (mTts != null) { | ||||
mTts.shutdown(); | mTts.shutdown(); |