I didn't find it anywhere, how can I handle entering sleeping mode in android? I want to do something when android device entered to the sleep mode? Is this possible or is there anyway to handle it?
Asked
Active
Viewed 3,169 times
2 Answers
2
Just make this by using BroadCastReceivers for system-calls (wakeup/sleep)
Android - how to receive broadcast intents ACTION_SCREEN_ON/OFF?
-
4Technically, these are not related to sleep mode. The device may stay awake for a bit after `ACTION_SCREEN_OFF` is broadcast. Similarly, the device may be on without the screen being on. However, they *are* the closest broadcasts related to "sleep mode" events. – CommonsWare Aug 15 '11 at 12:09
2
how can I handle entering sleeping mode in android?
Generally, you don't. There is nothing you need to do related to sleep mode.
I want to do something when android device entered to the sleep mode?
I certainly hope not.

CommonsWare
- 986,068
- 189
- 2,389
- 2,491