[Android Only] Added 'isDeviceIdleMode' function
This commit is contained in:
parent
a6a858f12b
commit
865cde52fe
@ -58,4 +58,16 @@ PowerManagement.prototype.dim = function(successCallback,failureCallback) {
|
||||
cordova.exec(successCallback, failureCallback, 'PowerManagement', 'acquire', [true]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks the device's idle state. Android Only.
|
||||
* *** Requires minimum API level 23 ***
|
||||
*
|
||||
* @param successCallback function to be called when the device's idle state returns successfully
|
||||
* @param errorCallback function to be called when there was a problem with checking the device's idle state
|
||||
*/
|
||||
|
||||
PowerManagement.prototype.isDeviceIdleMode = function(successCallback,failureCallback) {
|
||||
cordova.exec(successCallback, failureCallback, 'PowerManagement', 'isDeviceIdleMode', []);
|
||||
}
|
||||
|
||||
module.exports = new PowerManagement();
|
||||
|
Loading…
x
Reference in New Issue
Block a user