flutter-geolocator
flutter-geolocator copied to clipboard
[Bug]: Location update evnets are delivered in batches and out of order on Android
Please check the following before submitting a new issue.
- [X] I have searched the existing issues.
- [X] I have carefully read the documentation and verified I have added the required platform specific configuration.
Please select affected platform(s)
- [X] Android
- [ ] iOS
- [ ] Linux
- [ ] macOS
- [ ] Web
- [ ] Windows
Steps to reproduce
simply starts a location stream and make it running long enough in background (with wake lock).
Expected results
The callback is called with location events with the right order. (In batches or not does not matter that much)
Actual results
Events are delivered in batches, (i.e. a while without any updates, then a bunch of events are delivered at ~ same time but out of order).
Here is some data I got. (I set update interval to 1s and not doing much in the callback so it is not a race condition in my code). I also droped actual coordinates. I failed to find any report that Android may deliver location updates in random order so there might be a race condition in this lib. out_of_order_events.csv
Code sample
n/a
Screenshots or video
n/a
Version
4.5.4
Flutter Doctor output
n/a
Dear @CaviarChen,
Thanks for filing the issue. In order to investigate the issue could you please tell us something about the clear steps to reproduce or at lease some example code?
Kind regards,
Without additional information, we are unfortunately not able to resolve this issue. Therefore, we reluctantly closed this issue for now. If you run into this issue later, feel free to file a new issue with a reference to this issue. Add a description of detailed steps to reproduce, expected and current behaviour, logs and the output of 'flutter doctor -v'. Thanks for your contribution.