config settings not being used
liquidcms opened this issue · 1 comments
I have set config values (specifically interval and distanceFilter) and these appear to not be used.
Your Environment
- Plugin version: 3.1.0
- Platform: Android
- OS version: Android ver 9
- Device manufacturer and model: LG G6
- Running in Simulator: no, real device
- Cordova version (
cordova -v
): 10.0.0 - Cordova platform version (
cordova platform ls
): Cordova Platforms : 6.0.0, android 9.0.0, browser - Plugin configuration options:
desiredAccuracy: 0,
stationaryRadius: 2,
distanceFilter: 3,
notificationTitle: 'Background Tracking',
notificationText: 'Enabled',
debug: false,
interval: 5000,
stopOnTerminate: true, - Link to your project:
Context
I have interval set to 5000 (5 sec??) and distanceFilter set to 3 (m). When i run in browser i get 3 events almost immediately (likely not important as its the browser) timestamped at roughly the same time. And then it stops. On the real device, sitting on my sofa, i get events every 1 second. Indefinitely.
I thought perhaps the time/distance filters were being ORed instead of ANDed and maybe the distance accuracy is worse than 3m (which i am sure it is); so i changed it to 50 and retested. Still updated every 1 second.
Expected Behavior
I should get NO updates after the first event as i am not moving. If i were to start moving around; i should get 1 event every 3 seconds.
Actual Behavior
]Event fired every second.
Possible Fix
Steps to Reproduce
Context
I am trying to build a walking tour app. In other words, a user walks around and when they are close to a defined location, a windows opens with details about that location. Despite GPS spec suggesting i should be able to get 3m accuracy (which would be sufficient for the app); i have not seen any geo locate with cordova/android/my phone be any more accurate than 20m. Although this is not sufficient for the app; client is interested to see how well it works. So i need to start with simply following user around on the map (ala Google Maps); but firing constantly every 1 sec and when user is not moving, i am sure will kill battery very quickly.
Debug logs
- i'll look into grabbing these.
Same issue here, do you find a solution?
Or someone hear anything from @mauron85 ?