diff --git a/www/powermanagement.js b/www/powermanagement.js index 53164f4..2f5e1b9 100644 --- a/www/powermanagement.js +++ b/www/powermanagement.js @@ -26,8 +26,10 @@ var PowerManagement = function() {}; * @param successCallback function to be called when the wake-lock was acquired successfully * @param errorCallback function to be called when there was a problem with acquiring the wake-lock */ -PowerManagement.prototype.acquire = function(successCallback,failureCallback) { - cordova.exec(successCallback, failureCallback, 'PowerManagement', 'acquire', []); +PowerManagement.prototype.acquire = function(successCallback,failureCallback, runLockScreen) { + if( typeof runLockScreen === "undefined" ) runLockScreen = false; + + cordova.exec(successCallback, failureCallback, 'PowerManagement', 'acquire', [runLockScreen]); } /**