Android examples for android.os:Battery
is Battery Optimization Settings Available
import android.os.Build; public class Main { /**// ww w . j av a2 s. com * Check whether the battery optimization settings available in the current OS * version * * @return */ public static boolean isBatteryOptimizationSettingsAvailable() { return Build.VERSION.SDK_INT >= Build.VERSION_CODES.M; } }