Take a look at the PowerManager and the WakeLock Be careful with them though because keeping the cpu awake will drastically reduce battery life.
On Dec 10, 11:30 am, Alex Tang <tangli1987...@gmail.com> wrote: > Dear everyone, > I want my service keeps network connection alive even if user > presses the power button to shutdown the screen. As I have tested, > socket will return exceptions and through CONNECTIVITY_ACTION intent, > i know EXTRA_NO_CONNECTIVITY is true. So can current Android keep > connection not closed when screen is off? -- 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