Closed mcichecki closed 6 years ago
I have exactly the same problem. When I set the interval option to 60000ms (one minute), I get : 06-06 14:10:43 06-06 14:11:32 06-06 14:12:11 06-06 14:14:58 06-06 14:16:03 06-06 14:16:34 06-06 14:16:37 Have you find a solution for this issue ?
regards, Max
@MaximilienFaure Yes. It should work fine:
updateInterval = 60000; //60000ms = 1min
timePeriod: number = 1;
interval: this.updateInterval * this.timePeriod,
fastestInterval: this.updateInterval * this.timePeriod,
activitiesInterval: this.updateInterval * this.timePeriod,
Thanks for your answer, but I tried agin and that doesn't work. even if my configuration is like that : backgroundGeolocation.configure(callbackEnregistrementBackground, failureFn, { desiredAccuracy: backgroundGeolocation.accuracy.MEDIUM, stationaryRadius: 15, distanceFilter: 15, interval: 60000 //1min }); backgroundGeolocation.start();
I get this output :
06-06 15:44:47.697 06-06 15:47:50.473 06-06 15:51:11.474 06-06 15:51:11.495 06-06 15:51:46.470 06-06 15:56:50.749 06-06 16:01:51.584 06-06 16:02:32.660 06-06 16:03:25.457
So what is the accurate of interval ? about 1 minute ? 2 minutes ? 10 ?
ps : fastestInterval and activitiesInterval are just for android, no ?
Regards, Max
Notice: this issue has been closed because it has been reported for branch 2.x or later. It could be already fixed in v3 or is not relevant anymore. You may reopen this issue if it has been closed in error.
Your Environment
cordova -v
): 6.5.0cordova platform ls
):Installed platforms: android 6.1.2 Available platforms: amazon-fireos ~3.6.3 (deprecated) blackberry10 ~3.8.0 browser ~4.1.0 firefoxos ~3.6.3 ios ~4.3.0 osx ~4.0.1 webos ~3.7.0
Expected Behavior
I've got Range from Ionic components which changes the value of time interval: interval:
interval: this.timePeriod * this.ms
If interval is in miliseconds then 1 60000 should be 1min and 5 60000 = 300000 should be 5 min.Actual Behavior
I've set a simple server and could see that time period is not always equal. 1 6000 = data were appearing in every 2-4 seconds 5 6000 =
As you can see I've set 6000ms which is 6 seconds. 5 6 seconds = 30 seconds So it's more or less ok. But for 106000 which is one minute data were coming every ~35s:
So how can I define the range slider to be able to set interval for 5, 10, 15... minutes and the apply it to the app to get correct interval period?
Context
I'm trying to get range slider where user can set interval (5min, 10min and so on) and get data on the server every set period of time.