cordova-plugin-background-geolocation icon indicating copy to clipboard operation
cordova-plugin-background-geolocation copied to clipboard

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

Open G93692 opened this issue 4 years ago • 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

G93692 avatar Apr 16 '20 04:04 G93692

@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!

anujraghuvanshi avatar Apr 25 '20 21:04 anujraghuvanshi

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

liquidcms avatar Sep 20 '20 03:09 liquidcms