Closed marcob77 closed 1 year ago
What are you hoping to do with a distanceFilter of 20km?
It’s not going to save battery. The plugin will consume just as much energy with distanceFilter of 20000 vs 0.
If you want only periodic location updates, see Config.useSignificantChangesOnly.
What are you hoping to do with a distanceFilter of 20km?
It’s not going to save battery. The plugin will consume just as much energy with distanceFilter of 20000 vs 0.
If you want only periodic location updates, see Config.useSignificantChangesOnly.
Hi, thanks for answer. My need are to check if user change City,Country and send data to a server: so i dont need high precision about changing position (so i fixed distance filter 20km), but i need app to work in background as yours. Config.useSignificantChangesOnly works fine, but take position about every 1km (maybe i could have problem with privacy rules)so i dont know if its possible to change this behavior. Last but not the least, i need to use config usable also for android phone, because i will need also android version of my solution.
Config.useSignificantChangesOnly is far more privacy friendly and doesn’t keep the location radios ON all the time as you’re currently doing, needlessly draining the user’s battery just as much as if following a driving route on a native Map app (Eg Google maps).
config.useSignificantChangesOnly works for both iOS and Android, in spite of what the docs may say.
Config.useSignificantChangesOnly is far more privacy friendly and doesn’t keep the location radios ON all the time as you’re currently doing, needlessly draining the user’s battery just as much as if following a driving route on a native Map app (Eg Google maps).
config.useSignificantChangesOnly works for both iOS and Android, in spite of what the docs may say.
Ty again. I will use and test with config.useSignificantChangesOnly
Your Environment
cordova -v
): 11.0.0cordova platform ls
): ios 6.2.0#ready
:After user login window.BackgroundGeolocation.setConfig( { method: 'POST',
on location.. bgGeo.onLocation(function (location) { var sessionIsActive = storage.getItem('sessionIsActive'); let yourDate = new Date(); console.log("onLocation"); window.localStorage.setItem("dataAcquisizione",yourDate.toISOString().split('T')[0]);