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

@@ -104,7 +104,8 @@ public class BackgroundMode extends CordovaPlugin {
case "disable":
disableMode();
break;
case "optimizations":
case "webviewoptimizations":
case "batteryoptimizations":
case "background":
case "foreground":
case "tasklist":
@@ -303,5 +304,4 @@ public class BackgroundMode extends CordovaPlugin {
cordova.getActivity().runOnUiThread(() -> webView.loadUrl("javascript:" + js));
}
}