I wrote a little chat client that uses activity and service design for android.
The main time the client is running, only the service runs in background and notifys for new messages. Now my problem: The service should speak the incomming message with the help of the internal TTS system, but I have no how to build a “new TextToSpeech()” from the service!
Is there any possibility to create one without having an activity? And if, how?
regards christian
Refer android developers TextToSpeech link Here.
TextToSpeech constructors below.
sample code refer Here.