mirror of
https://bitbucket.org/TheBosZ/cordova-plugin-run-in-background
synced 2024-12-23 13:57:35 +00:00
Renamce enableGeoLocation -> disableWebViewOptimizations
This commit is contained in:
parent
4b2db271c1
commit
626776f60b
@ -104,8 +104,8 @@ public class BackgroundMode extends CordovaPlugin {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (action.equalsIgnoreCase("enableGeoLocation")) {
|
||||
enableGeoLocation();
|
||||
if (action.equalsIgnoreCase("disableWebViewOptimizations")) {
|
||||
disableWebViewOptimizations();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -271,7 +271,7 @@ public class BackgroundMode extends CordovaPlugin {
|
||||
/**
|
||||
* Enable GPS position tracking while in background.
|
||||
*/
|
||||
private void enableGeoLocation() {
|
||||
private void disableWebViewOptimizations() {
|
||||
Thread thread = new Thread(){
|
||||
public void run() {
|
||||
try {
|
||||
|
@ -93,9 +93,9 @@ exports.configure = function (options) {
|
||||
/**
|
||||
* Enable GPS-tracking in background (Android).
|
||||
*/
|
||||
exports.enableGeoLocation = function () {
|
||||
exports.disableWebViewOptimizations = function () {
|
||||
if (device.platform == 'Android') {
|
||||
cordova.exec(null, null, 'BackgroundMode', 'enableGeoLocation', []);
|
||||
cordova.exec(null, null, 'BackgroundMode', 'disableWebViewOptimizations', []);
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user