I am writing an activity that speaks to the user and I\'d really like to block on TextToSpeech initialization - or else time out. How can I get my thread to wait?
I
You need to initialize the TTS system within e.g. the activities onCreate() method, so that you can use it later when the user e.g. clicks a button.
See e.g. https://github.com/pilhuhn/ZwitscherA/blob/master/src/de/bsd/zwitscher/OneTweetActivity.java#L62 where setupspeak() is called and then later speak() ( https://github.com/pilhuhn/ZwitscherA/blob/master/src/de/bsd/zwitscher/OneTweetActivity.java#L344 ) which is then called when the user clicks the 'speak' button.