Closed chris-praxis closed 2 years ago
@chris-praxis i confirm minUpdateTime is in ms and is working as expected. I am not saying there is not an issue but it does not come from there. I use 1000 in all my apps and it correctly updates every 1s. I ll post the code I use Here is my code https://github.com/Akylas/jule_verne/blob/master/app/handlers/GeoHandler.ts#L1084
@farfromrefug Thank you for sharing code, that was helpful. After further testing, my problem is not seconds vs milliseconds. Instead, I seem to be hitting a hard minimum. If I do not provide 'minimumUpdateTime', then I get GPS location every 60s as expected from the default. If I set 'minimumUpdateTime = 10000', then I get GPS location every 10s as expected. If I set 'minimumUpdateTime = 1000', as you have, I get GPS location every 5-6s. If I set 'minimumUpdateTime = 1' as I was doing, then I get GPS location every 5-6s.
I've been using 'watchLocation' to get updates on iOS, but when I tried on Android it was not working until I set 'minimumUpdateTime' to a small number (e.g. 1-5). Apparently this number is in seconds. Looking in "gps.android.js", I see that the default is in milliseconds: const minTimeUpdate = 1 60 1000;
Which platform(s) does your issue occur on?
Please, provide the following version numbers that your issue occurs with:
Start watching for location changes and print whenever you get them. If 'minimumUpdateTime' is not set, then I don't get location update prints. If I set it to one for instance, then I get updates about every second.