androidandroid-api-levelspower-saving

How to check if the Battery Saver Mode is enabled on Android < 5.0?


As I know, there are some devices with version < 5.0 that have the Power Saver option.

An answer provided in this similar question is not correct and doesn't explain anything.

On Android 5.0+ we can use this script here:

PowerManager powerManager = (PowerManager) this.getSystemService(Context.POWER_SERVICE);
if ( powerManager.isPowerSaveMode()) {
    //code
}

My question is: is there a universal way to check if there IS a power saver mode and if it's enabled/disabled on API < 21?


Solution

  • For KitKat and below power saving is not a standard feature enabled in the stock android but some manufacturers implement this through some different methods. So there are no standard ways for checking this.