Q:

Android text to speech cuts off another text to speech

so I have a 3 CountDownTimers. 2 of the timers have the same time set. 1 has a different time set. After all timers reach 0, they restart again.
Well after about 3 restarts, the timers catch up with each other.. which is fine... however, I have it set so that at the 20 second mark, Timers 1 & 2 say something in text to speech. And Timer 3 also says something at the 20 second mark. The problem is that the whole phrase is not spoken because they are cutting each other off.
Currently, in all 3 of the countdowns i'm using:
tts.speak("20 seconds remaining.", TextToSpeech.QUEUE_FLUSH, null);

is this problem occuring because i'm using the same TextToSpeech (tts) ?
or maybe it has something to do with QUEUE_FLUSH and null?
And also if I change QUEUE_FLUSH to QUEUE_ADD the text just keeps repeating so that won't work

A:

I resolved this problem by using an onUtteranceCompleted callback that sets a boolean value to true when it's done speaking. This way, the voice doesn't get cut off.

