I\'m developing an app that should alert an user if is near a place. and of course have to do that also if the phone is in idle. With DOZE now I understood that I have to whitel
Try the below code to open Ignore Battery Optimization Settings page.
private void openPowerSettings() { startActivityForResult(new Intent(android.provider.Settings.ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS), 0); }
No extra permissions are required to be added to the manifest file.