diff --git a/README.md b/README.md index 0633ba5..47d205f 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,7 @@ components (network connection, GPS, etc.) when it is asleep for an extended per To check to see if the app that uses this plugin is on the device's battery optimization whitelist, use the following function: ```js +// 'result' is either 1 (in whitelist), or 0 (not in whitelist) window.powerManagement.isIgnoringBatteryOptimizations(function(result) { if (result === 1) { console.log('This app IS on the device\'s battery optimization whitelist.'); @@ -116,6 +117,7 @@ window.powerManagement.isIgnoringBatteryOptimizations(function(result) { This function can be use in conjunction with the `window.powerManagement.addAppToBatteryWhitelist` above. Example: ```js +// 'result' is either 1 (in whitelist), or 0 (not in whitelist) window.powerManagement.isIgnoringBatteryOptimizations(function(result) { // If the app isn't on the battery whitelist, open the dialog to add it if (result !== 1) {