thanks for the reply I don't think it is my service the one with the problem. I am using WAKE_LOCK, and also set setForground().
My service uses Text-to-speech service, and in the logcat output, I can see the text-to-speech service shutting down when the phone goes to sleep. My service then enters a state where it uses up cpu but does nothing. How can I set setForground(id, notificaiton) on the text-to-speech service so that it won't shutdown when the phone goes to sleep ? I guess I need a feature similar to the Navigation Activity where the phone speaks even if it is sleeping. Thanks for any help. On Oct 4, 6:46 am, Mark Murphy <[email protected]> wrote: > On Mon, Oct 4, 2010 at 3:11 AM,kronos<[email protected]> wrote: > > I was using WAKE_LOCK when the whole application was an Activity, but > > now that it is a Service and an Activity, WAKE_LOCK does not seem to > > work if used from the Service. > > A WakeLock works just fine in a service. > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://github.com/commonsguyhttp://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

