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 <[email protected]> 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 [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

Reply via email to