We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cordova -v
cordova platform ls
#ready
INSERT_YOUR_CODE_HERE
BackgroundGeolocation.watchPosition( (location) => { console.log("[watchPosition] -", location); localStorage.setItem('locations', JSON.stringify(location.coords)); this.lat = location.coords.latitude; this.lan = location.coords.longitude; this.odometer = location.odometer console.log('odometer',this.odometer) this.data = this.data + this.odometer console.log('data',this.data) // localStorage.setItem('odometer',this.data.toString()); this.saveLocation(this.lat, this.lan); // if ((localStorage.getItem('StopInterval') === 'false' && localStorage.getItem('StopInterval'))) { // this.store_getCurrentPosition(); // } }, (errorCode) => { console.log('[watchPosition] ERROR -', errorCode); }, { interval: 7000, // location capture interval desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_HIGH, persist: true, timeout: 60000, } );
// BackgroundGeolocation Plugin configuration BackgroundGeolocation.ready( { reset: true, // debug: true, logLevel: BackgroundGeolocation.LOG_LEVEL_VERBOSE, desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_HIGH, //autoSync: true, stopOnTerminate: false, allowIdenticalLocations: false, persistMode: BackgroundGeolocation.PERSIST_MODE_LOCATION, }, (state) => { console.log('[ready] BackgroundGeolocation is ready to use'); if (!state.enabled) { BackgroundGeolocation.start(); } } ); }
Actual KMS : 5 KM
In one trip it came 58 kms In another trip it came 20 Kms
PASTE_YOUR_LOGS_HERE
The text was updated successfully, but these errors were encountered:
Please learn to Syntax highlight codeblocks.
Sorry, something went wrong.
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
No branches or pull requests
Your Environment
cordova -v
): 11.0.0cordova platform ls
): Android 10.1,2#ready
: ReadyINSERT_YOUR_CODE_HERE
BackgroundGeolocation.watchPosition(
(location) => {
console.log("[watchPosition] -", location);
localStorage.setItem('locations', JSON.stringify(location.coords));
this.lat = location.coords.latitude;
this.lan = location.coords.longitude;
this.odometer = location.odometer
console.log('odometer',this.odometer)
this.data = this.data + this.odometer
console.log('data',this.data)
// localStorage.setItem('odometer',this.data.toString());
this.saveLocation(this.lat, this.lan);
// if ((localStorage.getItem('StopInterval') === 'false' && localStorage.getItem('StopInterval'))) {
// this.store_getCurrentPosition();
// }
},
(errorCode) => {
console.log('[watchPosition] ERROR -', errorCode);
},
{
interval: 7000, // location capture interval
desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_HIGH,
persist: true,
timeout: 60000,
}
);
// BackgroundGeolocation Plugin configuration
BackgroundGeolocation.ready(
{
reset: true,
// debug: true,
logLevel: BackgroundGeolocation.LOG_LEVEL_VERBOSE,
desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_HIGH,
//autoSync: true,
stopOnTerminate: false,
allowIdenticalLocations: false,
persistMode: BackgroundGeolocation.PERSIST_MODE_LOCATION,
},
(state) => {
console.log('[ready] BackgroundGeolocation is ready to use');
if (!state.enabled) {
BackgroundGeolocation.start();
}
}
);
}
Expected Behavior
Actual KMS : 5 KM
Actual Behavior
In one trip it came 58 kms
In another trip it came 20 Kms
Steps to Reproduce
Context
Debug logs
Logs
The text was updated successfully, but these errors were encountered: