Interval cannot be set in BackgroundGeolocationConfig, Battery draining issue in IOS
Opened this issue · 2 comments
G93692 commented
Interval cannot be set in BackgroundGeolocationConfig
Your Environment
- Plugin version: 3.1.0
- Platform: iOS
- OS version: 13.4
- Device manufacturer and model: iPhone 11
- Running in Simulator:
- Cordova version (
cordova -v
): "@capacitor/core": "^1.5.2" - Cordova platform version (
cordova platform ls
): "@capacitor/ios": "^1.5.2" - Plugin configuration options: desiredAccuracy: 10,
stationaryRadius: 20,
distanceFilter: 30,
debug: true,
stopOnTerminate: false,
notificationTitle: 'Background tracking',
notificationText: 'enabled',
interval: 10000,
fastestInterval: 5000,
activitiesInterval: 10000, - Link to your project:
Context
Expected Behavior
Battery draining issue, Interval cannot be set in BackgroundGeolocationConfig.
Actual Behavior
- Interval cannot be set in BackgroundGeolocationConfig. The Config interval changes is not reflected. Plugin itself set the value.
- Location change information frequency is not constant, Some time it is very frequent and sometimes very delayed
- If the device is idle and there is no device’s location, change notification frequency is reduced
Possible Fix
Battery draining issue should be fixed. Interval should be control from Application.
Steps to Reproduce
- Set the Location Settings as "While Using the App"
- Strat the BackgroundGeolocation
- Application may be in foreground, background or device is idle.
Context
Battery draining issue. Trying to accomplish is every 1 hour Location details would be received, device may be in Active, Inactive (Background ) or Device is in idle.
Debug logs
anujraghuvanshi commented
@G93692 - Give a try to this plugin, This Works. - �
- https://www.npmjs.com/package/cordova-plugin-bg-geolocation
- https://github.com/Anuj-Raghuvanshi/cordova-plugin-bg-geolocation
Thanks!
liquidcms commented
@Anuj-Raghuvanshi , this: https://www.npmjs.com/package/cordova-plugin-bg-geolocation has interval in minutes.. how does that make sense? Seems like quite a jump to go from ms (this plugin) to minutes (yours).