Page 1 of 1
Stopping/detecting daydream
Posted: 10 Mar 2015 14:47
by Etchings13
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
Posted: 10 Mar 2015 18:47
by Martin
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
Re: Stopping/detecting daydream
Posted: 11 Mar 2015 01:09
by Etchings13
Thank you! Exactly what I was looking for.