how to handle sleep mode enter in android?

爱⌒轻易说出口 提交于 2019-12-10 17:52:10

问题


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.



来源:https://stackoverflow.com/questions/7063382/how-to-handle-sleep-mode-enter-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!