Hi all, I want to write a simple app to read out SMS messages from my phone -- I also want an ON/OFF setting which can be set through an activity.
The idea is that the activity is only launched to configure the shared preference of ON/OFF. A BroadcastReceiver or something similar which is in the background then intercepts the SMS_RECEIVED intent and depending on the shared preference either invokes the TTS engine to speak out the content or not. I have written a BroadcastReceiver which receives the SMS_RECEIVED intent and unpacks the data, but when I try to create an instance of the TextToSpeech class I get an exception saying that a service can't be started/bound from a BroadcastReceiver. I understand this is because BroadcastReceivers are supposed to be short-running processes. There is a hack I have seen on the forums which is used for com.google.tts, this is the old TTS package which was used before TTS became a part of the Android API. I would like to find a solution which can make use of the official Android API. I think I may require a service for this task, if so, what would I need to do to get this to work? Best regards, Alex -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en