Maui now has Microsoft.Maui.Devices.Sensors.Geolocation.StartListeningForegroundAsync
which is nice and works well, but it is only for foreground tracking, so even if you have the required permissions for your app (and have a service running on Android), you can not track in the background.
Why they decided to do that… well… I want to love Maui, but it is not always easy.
Anyway, from Xamarin, and working on Maui, there is the old Geolocator.Plugin
which does support background tracking, and that can be used fine on Android, but for some reason, on iOS (only tested on 17) regardless of the listener settings (report right away, do not wait for significant motion etc.) samples are very rare, and it seems that the options are ignored and the threshold for location updates is about 500m, which is not working for me.
I have previously made my own listeners in Android and iOS separately, which worked, but it has been a while and the code is ancient and has also not been tested with iOS 17. Besides I try to use standard Maui when possible, maintained plugins when I have to and only do these native implementations when i am absolutely forced to do it.
I am curious if others have some insight into this. Have you made Geolocator.Plugin
work with Maui iOS 17, or do you know of a solid plugin which will work?