mauron85/cordova-plugin-background-geolocation

Interval cannot be set in BackgroundGeolocationConfig, Battery draining issue in IOS

Opened this issue · 2 comments

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

  1. Interval cannot be set in BackgroundGeolocationConfig. The Config interval changes is not reflected. Plugin itself set the value.
  2. Location change information frequency is not constant, Some time it is very frequent and sometimes very delayed
  3. 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

  1. Set the Location Settings as "While Using the App"
  2. Strat the BackgroundGeolocation
  3. 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

@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).