When the screen goes off, the device goes to sleep. This means that the main CPU shuts off. You can prevent this by holding a wakelock. WARNING: Holding a wake lock for a substantial period of time will have a terrible effect on battery life. Android achieves better battery life by doing as little as possible and sleeping as much as possible. Please consider the best interests of your users when doing things that will adversely effect their experience.
Cheers, Justin Android Team @ Google On Oct 23, 1:21 pm, Dex Wood <[EMAIL PROTECTED]> wrote: > I am developing an application that uses the accelerometer and/or gps > inside of a service. It will be in use while the service runs in the > background until the user terminates the service. I am using usb > debugging on the device and I noticed in logcat it is saying give-up > screen and my service stops getting input from the accelerometer. Is > there a way to have a service run while the phone is idle for a period > of time without having to disable the key-lock? --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---