Closed MazahirA closed 11 months ago
Update: On removing the below line of codes, the plugin is neither sending requests every milli second nor after the set interval:
//Stationary-state check: BackgroundGeolocation.on('stationary', function(stationaryLocation) { console.log('[info] App is in stationary state') BackgroundGeolocation.configure({ debug: true }); }); So the confusion here is; Does it configure other params as default, when we use subset/subsets of the whole configuration?
I suggest reading the plugin's logs and debugging if needed. The GPS configuration is complicated and what you get back from the device is not straight forward in most cases...
Describe the bug On Background and Stationary state, the plugin ignores the interval and send data every millisecond.
To Reproduce Steps to reproduce the behavior:
Expected behavior A clear and concise description of what you expected to happen.
Configuration BackgroundGeolocation.configure({ locationProvider: BackgroundGeolocation.DISTANCE_FILTER_PROVIDER, desiredAccuracy: BackgroundGeolocation.HIGH_ACCURACY, stopOnTerminate:false, stationaryRadius: 50,
distanceFilter: 50, notificationTitle: 'Background Tracking', notificationText: 'Verifying your current location', debug: false, interval: 60000, fastestInterval: 120000, activitiesInterval: 120000, url:'http://server', postTemplate: { Latitude: '@latitude', Longitude: '@longitude', Provider: '@provider', Accuracy: '@accuracy' } });
Smartphone (please complete the following information):
Additional context I'm configuring the plugin to send location updates (data) every five minutes, in every state (FG, BG, Stationary, Terminate). For that purpose I'm using the above configuration. I expect the plugin to send data every five minutes, in every state. But it sending data after every milli seconds in Background + Stationary state. But on termination, it stops sending data in that frequency.