TextToSpeech setOnUtteranceCompletedListener always returns -1 error?

Posted by Robert Nekic on Stack Overflow See other posts from Stack Overflow or by Robert Nekic
Published on 2010-04-21T14:41:11Z Indexed on 2010/04/21 14:43 UTC
Read the original article Hit count: 476

Filed under:
|

I've been working with Android's TTS functions with general success however, one piece of it refuses to work for me; I can not successfully assign an OnUtteranceCompletedListener to my TextToSpeech object.

I've tried implementing OnUtteranceCompletedListener in one of my classes and I've tried creating a new, stand-alone OnUtteranceCompletedListener instance. Both approaches are simple enough to implement and appear to yield proper listeners without exceptions...yet setOnUtteranceCompleteListener(myListener) ALWAYS returns -1 (ERROR).

The documentation for this seems straight forward. Has anyone gotten this to work? I'm targeting SDK 4. Are there known issues with this with SDK4/v1.6?

© Stack Overflow or respective owner

Related posts about android

Related posts about text-to-speech