Stopping/detecting daydream
Moderator: Martin
-
- Posts: 2
- Joined: 10 Mar 2015 14:42
Stopping/detecting daydream
I know we can automagically start the daydream service, but is there a way to end it or at least detect when it is running? For example I would like the phone to do certain tasks but only when daydream is active.
Re: Stopping/detecting daydream
Hi,
You can use trigger General Broadcast with field ACTION set to android.intent.action.DREAMING_STARTED resp. android.intent.action.DREAMING_STOPPED to detect the daydream. The two actions are also listed when using the [...]-button so you don't have to type it manually.
You could set a global variable to true/false when you need to check if the device is currently dreaming in another flow.
Action Turn Screen On should wake the device from dreaming.
Regards,
Martin
You can use trigger General Broadcast with field ACTION set to android.intent.action.DREAMING_STARTED resp. android.intent.action.DREAMING_STOPPED to detect the daydream. The two actions are also listed when using the [...]-button so you don't have to type it manually.
You could set a global variable to true/false when you need to check if the device is currently dreaming in another flow.
Action Turn Screen On should wake the device from dreaming.
Regards,
Martin
-
- Posts: 2
- Joined: 10 Mar 2015 14:42
Re: Stopping/detecting daydream
Thank you! Exactly what I was looking for.