One of the things that I love about Android Marshmallow is Doze, the battery saving feature of the OS that I believe is one of the killer features of the release. But for some users, Doze and App Sleep have proven to be a little bit to sleepy, especially when it comes to Gmail. Multiple users have reported in various forums, websites and communities that they are having notifications for Gmail not happen if their device is in Doze. The reason behind this is pretty straight forward. Google has enabled battery optimization for Gmail so when your phone is in Doze it does not listen for email and thus, you don’t get notified.
There is a way however for you to prevent this from happening which is to turn off the optimization for the app on your Android Marshmallow powered device. In fact, the How To I’m going to outline can be applied to any app that you have installed on your phone or tablet, not just Gmail. But, and you probably figured this out already, by disabling battery optimization, you lose some of the battery saving benefits of Doze on your device. Essentially this How To is going to show you how to bypass Doze so proceed with caution. If you override to many apps, you will still see a lot of battery drain while your device is sitting idle, unplugged on your desk.
To start, go to Settings on your Marshmallow-powered phone or tablet then navigate to Battery (Settings>Battery). Now use the menu in the upper-right corner to go to Battery optimization. You should now see a page that shows you the apps or services that are not optimized on your device. This list is usually pretty small given that Google wants apps optimized to improve battery life.
Using the down arrow next to “Not optimized”, select All apps which will expose all of the apps on your device.
On this list of all of your apps, scroll down until you find Gmail and then tap on it. This will bring up a small options box with two options: Optimizied and Don’t optimize. Optimized is what it will be set to by default. Tap the Don’t optimize radio button and then tap done. Gmail is now not battery optimized which means it will be listening for new messages and give you notifications even when your device is in Doze.
By doing this little work around you should see your Gmail notifications as you do when your device is in use or charging (when Doze isn’t enabled).
This How To, as you might have guessed, will work with any app that you have installed on your Android phone or tablet so you could in theory enable it for as many apps as you want. But, as mentioned, you lose the efficiency of Doze and Marshmallow as a whole so you will want to do this sparingly.
For more How To’s and other tips, be sure to check out the How To pages.