I've followed this stackoverflow post to set my Nexus 5 device to the 'IDLE' state with adb, after switching off the screen.
> adb shell dumpsys battery unplug
> adb shell dumpsys deviceidle step
Stepped to: IDLE
Despite this, I am able to see through my device logs the GCM notifications being received.
1-04 15:21:40.708 22138 26007 I GCM : GCM message com.sample.app 0:1446610899548646%82d6ec5bf9fd7ecd
My understanding is that Doze mode will allow for certain maintenance windows where normal priority notifications are pushed in a batch, so I was not expecting to see such log entry. (I have also logged all the entries in the received Bundle
and can see all the attributes of the notification)
When I step the device into the IDLE_MAINTENANCE
mode, I do not see the device receiving any further notifications (presumably since it has already received it)
I have been pushing notifications with payloads including and excluding the priority property, and it does not seem to make a difference.
I am testing on a device with Android Build Number MRA58K, with a project using Google Play Services version of 8.1.0.
In addition, I am not able to access the network (in response to a GCM notification) only when the device is in the 'IDLE' state, which suggests that the deviceidle step does have some effect.
Is there a step that I am missing in order to set the device into a proper 'IDLE' mode?