16

Samsung devices (well, at least some of them) add all installed apps to an "App Power Saving Mode" list which affects the background services listening to some crucial info for the app.

Some apps, somehow, disable this mode after installation without any extra steps. Comments on Programmatically disable app power saving mode on Samsung thread suggest that apps like Facebook and WhatsApp might be in the OS whitelist but I've seen apps that are not as popular doing the same. Any idea how to achieve this?

I've tried using ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS intent but no success. PowerManager#isIgnoringBatteryOptimizations starts returning true but neither App Power Saving Mode nor the thing in Battery Saver Settings is disabled for the app.

If you think the only way is to contact Samsung to whitelist the app, where's the best place to do so?

Also, if there's no way to disable App Power Saving Mode programmatically, is there a way to detect if it's enabled for the app so that I can open the app and ask the user to disable it?

1
  • Any news on this? We have the same problem...
    – mbo
    Jul 5, 2017 at 7:12

1 Answer 1

0

Hi there are two power save modes:

  • the regular android Doze mode,

  • and the custom "Power save mode.

For doze mode the action:

Intent intent = new Intent(); intent.setAction((Settings.ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS); intent.setData(Uri.parse("package:" + packageName))

and start the intent.

But for custom power save modes (especially Huawei and some others) you have to start custom power save modes intents based on vendor. The list is here: https://stackoverflow.com/a/48641229/4606542

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.