mirror of
https://bitbucket.org/TheBosZ/cordova-plugin-run-in-background
synced 2024-11-21 23:04:53 +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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (action.equalsIgnoreCase("enableGeoLocation")) {
|
if (action.equalsIgnoreCase("disableWebViewOptimizations")) {
|
||||||
enableGeoLocation();
|
disableWebViewOptimizations();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -271,7 +271,7 @@ public class BackgroundMode extends CordovaPlugin {
|
|||||||
/**
|
/**
|
||||||
* Enable GPS position tracking while in background.
|
* Enable GPS position tracking while in background.
|
||||||
*/
|
*/
|
||||||
private void enableGeoLocation() {
|
private void disableWebViewOptimizations() {
|
||||||
Thread thread = new Thread(){
|
Thread thread = new Thread(){
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
|
@ -93,9 +93,9 @@ exports.configure = function (options) {
|
|||||||
/**
|
/**
|
||||||
* Enable GPS-tracking in background (Android).
|
* Enable GPS-tracking in background (Android).
|
||||||
*/
|
*/
|
||||||
exports.enableGeoLocation = function () {
|
exports.disableWebViewOptimizations = function () {
|
||||||
if (device.platform == 'Android') {
|
if (device.platform == 'Android') {
|
||||||
cordova.exec(null, null, 'BackgroundMode', 'enableGeoLocation', []);
|
cordova.exec(null, null, 'BackgroundMode', 'disableWebViewOptimizations', []);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user