StopListeningAsync does not always stop the location monitoring if the geolocator was started with significant location changes (SLC). SLC wakes the app periodically and even restarts it after a device reboot. In those cases, IsListening in GeolocatorImplementation might no longer be true, so StopListeningAsync immediately returns.
CLLocationManager does not seem to provide a property to check for the current listening status, yet it appears to be save to call stopMonitoringSignificantLocationChanges on CLLocationManager even when the manager is not currently monitoring. But even if the check for IsListening was removed from StopListeningAsync, we would still need to know whether we should stop the "normal" location updates or SLC, so maybe the ListenerSettings need to be passed into StopListeningAsync as well?
This is a
Which plugin does this impact:
StopListeningAsync does not always stop the location monitoring if the geolocator was started with significant location changes (SLC). SLC wakes the app periodically and even restarts it after a device reboot. In those cases, IsListening in GeolocatorImplementation might no longer be true, so StopListeningAsync immediately returns.
CLLocationManager does not seem to provide a property to check for the current listening status, yet it appears to be save to call stopMonitoringSignificantLocationChanges on CLLocationManager even when the manager is not currently monitoring. But even if the check for IsListening was removed from StopListeningAsync, we would still need to know whether we should stop the "normal" location updates or SLC, so maybe the ListenerSettings need to be passed into StopListeningAsync as well?