Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

CrossGeoLocator plugin hanging

$
0
0

I have this code:

        var timeout = TimeSpan.FromSeconds(1);
         var locator = CrossGeolocator.Current;
         locator.DesiredAccuracy = 100.0;
         if (!CrossGeolocator.IsSupported || !locator.IsGeolocationAvailable || !locator.IsGeolocationEnabled )
         {
            return false;
         }
         var position = await locator.GetPositionAsync(timeout, null, true);
         double speedInMetersPerSecond =  position.Speed;

It consistently hangs on the next-to-last line. Are others experiencing this?

Thanks!


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>