On Tue, Jun 22, 2010 at 12:04 PM, pranay <[email protected]> wrote: > hi, i have an app that responds to user the incoming sms via speech . > The app seems to work perfectly when it is lauched or even when i > press the back button on the emulator, however when i start a new > app , then i receive the new message only as a Toast (as shown in the > prgm below) but i cannnot hear any sound. I checked the logcat and > found that in this situation i get the error that : "null synthesis- > can't speak" .
It is not safe to kick off anything that might take a while in a BroadcastReceiver, as it may cause your process to be terminated with the background equivalent of an application-not-responding error. At minimum, you need to move this to an IntentService and out of the BroadcastReceiver. It is also possible that speech synthesis can only be done by an Activity -- I have no idea if services can do it or not. Also, please bear in mind that the intent-filter you are presumably using for this application uses an action string that is not part of the Android SDK, and so your code may break in the future. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

