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?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Just make this by using BroadCastReceivers for system-calls (wakeup/sleep)
Android - how to receive broadcast intents ACTION_SCREEN_ON/OFF?
回答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.