unable to increase sample rate ?
Closed this issue · 1 comments
sanjaygir commented
Your Environment
-
Plugin version:
Any version -
Platform: iOS or Android
Android -
OS version:
Any version -
Device manufacturer and model:
google pixel, gionee a1. I think the problem is in all models.
- Running in Simulator:
- Cordova version (
cordova -v
): - Cordova platform version (
cordova platform ls
): - Plugin configuration options:
- Link to your project:
Context
We cannot increase the sample rate. Right now the sample rate is above 2 seconds. We have tried changing the interval in the configuration and we have tried many other combinations in the configuration.
this is the configuration we are using
this.model.geo_location.configure({
locationProvider: BackgroundGeolocationLocationProvider.DISTANCE_FILTER_PROVIDER,
startForeground: true,
notificationTitle: '',
notificationText: 'enabled',
interval: 0,
debug: false,
desiredAccuracy: 0,
stationaryRadius: 0,
distanceFilter: 3,
fastestInterval: 500,
});
Expected Behavior
We would like to sample as close to 1 second.
Actual Behavior
Sample rate is higher than 2 seconds.
Possible Fix
Steps to Reproduce
- we are using model.geo_location.start(); to start recording the points
- model.geo_location.stop() to stop recording the points
- geo_location.getValidLocations(). to retrieve all recorded points
Context
Debug logs
sanjaygir commented
ok this has been fixed now. Seems like we can get the needed sample rate only by switching provider to ACTIVITY_PROVIDER.