New "disableBatteryOptimizations" function for Android

This commit is contained in:
Sebastián Katzer
2019-02-08 18:45:03 +01:00
parent 9fb7257297
commit 537f7a859f
5 changed files with 45 additions and 5 deletions

View File

@@ -160,7 +160,20 @@ exports.disableWebViewOptimizations = function()
{
if (this._isAndroid)
{
cordova.exec(null, null, 'BackgroundMode', 'optimizations', []);
cordova.exec(null, null, 'BackgroundMode', 'webviewoptimizations', []);
}
};
/**
* Disables battery optimazation mode for the app.
*
* @return [ Void ]
*/
exports.disableBatteryOptimizations = function()
{
if (this._isAndroid)
{
cordova.exec(null, null, 'BackgroundMode', 'batteryoptimizations', []);
}
};