With the release of Android Marshmallow operating system, there have been quite a few discussions about the features of this new Operating System from Google.
Android Marshmallow is different from Lollipop, but the question is, how much? The major six new key features include app permission, fingerprint support, better web experience, mobile payments, improved app links and improved power and charging times.
Improvement in Charging Time
The improvement in power and charging time is what many had been looking forward to for Android phones. Most Android phones did not offer enough backup, or its battery drained out fast. To improve the power utilization capacity, the Android Marshmallow has come up with a feature called Doze.
DOZE- The nap time for our phone!
Doze is a feature that puts your phone in the temporary sleeping mode when it is not being used for a specific duration of time. It is quite analogous to the hibernation feature present in our laptops but with some differences.
For the phone to enter into the doze mode, it needs to be unplugged, stationary, and the screen should be off for a specific period.
During the doze mode, the operating system will put off the entire active or background applications of the phone. However, the phone will periodically perform the normal operations for the purpose of synchronization of the apps and the pending operations.
This brief performance of the normal operation is done in the idle maintenance window. The working is same for almost all the apps but some apps behavior gets affected due to this development - like that of Google Cloud Messaging.
Google Cloud Messaging and its behavior in Doze-Mode
Google Cloud Messaging or GCM is a service that developers use to send the data from the server to the android application. Android app developers can send important information as an app update to users easily through GCM to users.
So, how will GCM behave under Doze?
GCM has two types of priorities for its messages- one is the normal priority, and the other one is a high priority. When any message has a high priority, the device sends it by waking up the phone from the doze mode but when the message has default priority i.e. the normal priority is selected, the behavior is quite different.
When the device is in doze mode, all the messages in GCM with normal priority will be batched to be sent from the server either to idle maintenance window or to the device, if the device wakes up before that. There is one disadvantage with the normal priority - the messages whose lifetime expires within the doze mode of the device are lost.
Though this can happen with messages with normal priority, it is recommended that the default priority is normal. The whole purpose of power saving phenomenon is lost if the device needs to be woken up again and again to send messages with high priority. Doze thus makes a trade off with losing short-lived messages and it’s a great help in conserving power when you don’t really need it.