You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 11, 2021. It is now read-only.
Some people mention that sometimes the application does not show an notification to them. This is probably do to this:
ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS
added in API level 23
String ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS
Activity Action: Show screen for controlling which apps can ignore battery optimizations.
Input: Nothing.
Output: Nothing.
You can use PowerManager.isIgnoringBatteryOptimizations() to determine if an application is already ignoring optimizations. You can use ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS to ask the user to put you on this list.
added in API level 23
String ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS
Activity Action: Ask the user to allow an app to ignore battery optimizations (that is, put them on the whitelist of apps shown by ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS). For an app to use this, it also must hold the REQUEST_IGNORE_BATTERY_OPTIMIZATIONS permission.
Note: most applications should not use this; there are many facilities provided by the platform for applications to operate correctly in the various power saving modes. This is only for unusual applications that need to deeply control their own execution, at the potential expense of the user's battery life. Note that these applications greatly run the risk of showing to the user as high power consumers on their device.
Input: The Intent's data URI must specify the application package name to be shown, with the "package" scheme. That is "package:com.my.app".
Output: Nothing.
You can use PowerManager.isIgnoringBatteryOptimizations() to determine if an application is already ignoring optimizations.
Some people mention that sometimes the application does not show an notification to them. This is probably do to this:
ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS
added in API level 23
String ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS
Activity Action: Show screen for controlling which apps can ignore battery optimizations.
Input: Nothing.
Output: Nothing.
You can use PowerManager.isIgnoringBatteryOptimizations() to determine if an application is already ignoring optimizations. You can use ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS to ask the user to put you on this list.
Constant Value: "android.settings.IGNORE_BATTERY_OPTIMIZATION_SETTINGS"
ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS
added in API level 23
String ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS
Activity Action: Ask the user to allow an app to ignore battery optimizations (that is, put them on the whitelist of apps shown by ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS). For an app to use this, it also must hold the REQUEST_IGNORE_BATTERY_OPTIMIZATIONS permission.
Note: most applications should not use this; there are many facilities provided by the platform for applications to operate correctly in the various power saving modes. This is only for unusual applications that need to deeply control their own execution, at the potential expense of the user's battery life. Note that these applications greatly run the risk of showing to the user as high power consumers on their device.
Input: The Intent's data URI must specify the application package name to be shown, with the "package" scheme. That is "package:com.my.app".
Output: Nothing.
You can use PowerManager.isIgnoringBatteryOptimizations() to determine if an application is already ignoring optimizations.
Constant Value: "android.settings.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"
https://developer.android.com/reference/android/provider/Settings.html#ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS
The text was updated successfully, but these errors were encountered: