How to detect when daydream starts/ends

守給你的承諾、 提交于 2019-12-11 03:38:36

问题


In jellybeam mr2 daydream replaced display sleep. An application was able to know when the sleep starts or ends by registering broadcast receiver for action ACTION_SCREEN_ON, ACTION_SCREEN_OFF. Is there any way to do the same against daydream?

Just to be clear, I'm not trying to add a new daydream service, but just want to be informed of (any) daydream-related events.


回答1:


register for

Intent.ACTION_DREAMING_STARTED and Intent.ACTION_DREAMING_STOPPED


来源:https://stackoverflow.com/questions/16231082/how-to-detect-when-daydream-starts-ends

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