Closed abhay081994 closed 5 years ago
I an using GeoLocator for current location in xamarin.so when i start listening it shows my current location but when i pause and again start then is shows lat=0,long=0 only in IOS.(in Andorid everything works fine.) This is my Code:
public async void CurrentLocation() { try { await CrossGeolocator.Current.StartListeningAsync(TimeSpan.FromSeconds(10), 0, true, new Plugin.Geolocator.Abstractions.ListenerSettings { ActivityType = Plugin.Geolocator.Abstractions.ActivityType.AutomotiveNavigation, AllowBackgroundUpdates = true, DeferLocationUpdates = true, DeferralDistanceMeters = 1, //DeferralTime = TimeSpan.FromSeconds(10), ListenForSignificantChanges = false, PauseLocationUpdatesAutomatically = false }); CrossGeolocator.Current.PositionChanged += changedPosition; } } public void Start_button() { CurrentLocation(); } public async void Pause_button() { await CrossGeolocator.Current.StopListeningAsync(); }
please help me and thanks in advance.
You should filter these out as I just return what Apple gives me.
I an using GeoLocator for current location in xamarin.so when i start listening it shows my current location but when i pause and again start then is shows lat=0,long=0 only in IOS.(in Andorid everything works fine.) This is my Code:
please help me and thanks in advance.