3

Since it's not possible to use the infamous action Settings.ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS to disable battery optimization in order to avoid sending the user to the settings screen to do so manually, I've tried to register an observer to listen to this change and then manually check (with Power_Service) if it was disabled or not.

Unfortunately, both Settings.ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS and the more general one, System.CONTENT_URI (with descendants) won't trigger upon this specific change.

I assume it's not possible but would love if someone can share if they managed to achieve that somehow.

Lior Iluz
  • 26,213
  • 16
  • 65
  • 114

0 Answers0