Exclude app from using doze mode
suggest change- Open Settings.
- Open Battery.
- Open the menu and select Battery optimization.
- From the dropdown, select All apps.
- Select the app to whitelist.
- Select Don't optimize.
The app then appears under Not optimized.
Check the whitelist with PowerManager:
PowerManager powerManager = (PowerManager) getSystemService(POWER_SERVICE);
boolean ignoring = powerManager.isIgnoringBatteryOptimizations(getPackageName());
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents