19 Oct' 15

Marshmallow’s DOZE MODE And How It Is Handled by GCM

marshmallow Doze

It is not every day that a mobile operating system’s upgrade lives up to its promise. But that just might be happening with Android’s Marshmallow. According to a research by a German tech magazine Computer Base, a Marshmallow powered Nexus 5 enjoys almost three times more battery life that the same device running on its predecessor Lollipop. If that sounds exciting, you would want to read to find out what you can expect from Doze and how Google Cloud Messaging handles it.

Doze Off in Style

As many of you have already figured out, Marshmallow’s DOZE MODE is all about your cell phone taking a nap. This feature automatically kicks in when your mobile device is not connected to a charger and is idle with the screen off. With the device in Doze mode, it will not be woken up with unnecessary emails or Candy Crush update notifications. What’s the outcome? The OS will end up saving a lot of battery life in the process. Computer Base, that tested Marshmallow in real-life scenario, also found that Nexus 5 running on Lollipop went down by 24 percent after 48 hours of standby, whereas the same model running on Marshmallow went down by a mere 9 percent. This means that Lollipop-powered Nexus 5 can go on for 200 hours on standby, and with Marshmallow, the device can last up to 533 hours. Now that’s some promising figure!

How Doze Affects GCM

As the Doze mode does not wake up the mobile device in case of incoming notifications, users can often miss important notices that need immediate action. As a result, Google Cloud Messaging (GCM), which allows Android app development teams to send crucial data to their apps directly from the server, has a very interesting take on Marshmallow’s Doze. GCM marks carrier network notifications (texts and calls) as high-priority by default, the only ones allowed to stop Doze. On the other hand, Android app notifications are marked as normal priority.

However, GCM gives the chance to developers to manually declare their apps as high-priority. And yes, this creates an ample scope for developers to abuse this power. But it is not easy to fool. It moderates every mobile device, and takes strict actions if a development team is frequently stopping the phone from dozing as intended. Confirming this Dianne Hackborn, an Android Framework engineer, wrote on her Google+ profile, “Abuse of high priority messages have a special difference from other things like notifications: they must go through Google servers, so Google can monitor and modify what is being sent to devices. If apps abuse these for other things besides their intended use, we will be able to stop that abuse without touching any software on the device. ”

The idea of mobile devices putting its features to sleep mode is nothing new. But it’s no doubt interesting to see the OS itself integrating a default feature that works wonders in saving the battery life. And by the looks of it so far, Doze is already playing a big part in offering a great experience to Marshmallow users.

Sucharita Ganguly

Senior Associate Android

Sucharita is the Android lady. She develops awesome Android apps. When it comes to the latest upgrades and Android mobile dev technologies, she is the our girl! When not working, she plays games on phones.

Leave Comment

Your email address will not be published. Required fields are marked *