Please does anybody know what could cause this exception? http://cl.ly/370E3C4425162j2F2b3h (screenshot from LogCat)
That is how I am calling the TextToSpeech
public void say(String text, Context context, String utteranceID){
if(mTts == null){
this.text = text;
mTts = new TextToSpeech(context, (OnInitListener) helper);
}
else{
map.clear();
map.put(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID, utteranceID);
mTts.speak(text, TextToSpeech.QUEUE_FLUSH, map);
}
}
The TextToSpeech actually works as it should (but as you can see not at all:), but since my app uses TTS really often I am holding TTS instance in custom helper class..and some time I got the exception. It comes incidentally, sometimes it just works, sometimes the UI freezes for sometime and then is thrown the exception. (whole thing is part of blind-enabled UI)
How to fix android.os.DeadObjectException android X
actually this is possible solution..but after looking at the stack trace I think my problem is different