Groups
Groups
Sign in
Groups
Groups
Automate for Android
Conversations
About
Send feedback
Help
How to know if doze mode is running?
1,876 views
Skip to first unread message
axzx...@gmail.com
unread,
May 12, 2016, 11:30:27 PM
5/12/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Automate
I have automate in the whitelist, but I don't know how to detect doze mode is enabled or not.
Henrik "The Developer" Lindqvist
unread,
May 13, 2016, 2:28:19 PM
5/13/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Automate, axzx...@gmail.com
Doze is always enabled, it can't be disabled. The "Not optimized" in battery settings controls "app standby", which is another feature.
There's no block to detect if the device is currently "dozing". I can add a block for it, until then use the Broadcast receive block with action=
"android.os.action.DEVICE_IDLE_MODE_CHANGED"
https://developer.android.com/reference/android/os/PowerManager.html#ACTION_DEVICE_IDLE_MODE_CHANGED
For "app standby" use action=
"android.os.action.POWER_SAVE_MODE_CHANGED"
https://developer.android.com/reference/android/os/PowerManager.html#ACTION_POWER_SAVE_MODE_CHANGED
Reply all
Reply to author
Forward
0 new messages