Is there a way to exclude an app from Doze? Doze has been bringing great benefit for my aging Nexus 5. But sadly, its presence also marks an end for my WhatsApp Web experience; since their "web" app is actually just a mere "interface" and still requires the phone to be actively connected to the Internet.

As we all know, Doze puts one's phone into a stand-by state where every unnecessary connection is halted. This means it will also halt the WhatsApp app in my phone (and thus in my computer's browser).

Now, is there a way to exclude WhatsApp from Doze? I mean, is something like that possible?

p.s., I prefer a non-rooted approach to this problem, but should rooting be my only option, so be it.
This answer is based off my Nexus 9 on MRA58K. It should be similar for any app.

Follow the steps as given below:


Go to Settings &rarr; Battery
Tap on the top right 3-dot menu, and choose Battery Optimisation.
There should be a dropdown below the actionbar on the top left, choose All Apps from the list.
Find your app in the list (in this case, Whatsapp)
Tap on it. You will get a popup with 2 options, Optimise and Don't Optimise
Optimise should be selected by default.
Select "Don't Optimise", and press "Done" below.
That's it. I hope it works for you.