Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programmatically disable app power saving mode on Samsung

Tags:

android

I am the developer of a messaging application. My application get put on an automatic power save mode which prevents messages from getting through.

When I go to the App Power Saving option on a Samsung phone (Settings->Battery->App Power Saving option), I can see that this option is "Disabled" for certain apps (like WhatsApp and Facebook messenger).

When I do a clean install of the WhatsApp application, the power saving mode gets disabled by default before I even open the app.

This seems to be specific to Samsung devices Android version 6.0.1 and higher.

Is it possible to disable power saving by default for my application?

like image 676
Jac Steenekamp Avatar asked Jul 27 '16 09:07

Jac Steenekamp


People also ask

How do you change apps to power saving mode on Samsung?

First, navigate to Settings, and then tap Battery and device care. Tap Battery, and then tap Power saving. Tap the switch to turn it on. This will limit certain things on your device, such as background network usage and syncing.


1 Answers

You can ask user to ignore battery optimizations: https://developer.android.com/training/monitoring-device-state/doze-standby.html#support_for_other_use_cases

But your use case needs to be acceptable for Google Play validation: https://developer.android.com/training/monitoring-device-state/doze-standby.html#whitelisting-cases

like image 97
Guillaume Perrot Avatar answered Oct 27 '22 00:10

Guillaume Perrot