From 9c248c5aba4290d21cc449532e66175d77cde5bc Mon Sep 17 00:00:00 2001 From: Max Bassett Date: Wed, 10 Aug 2016 15:17:26 -0400 Subject: [PATCH] Argument clarification --- README.md | 2 ++ 1 file changed, 2 insertions(+) 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) {