locked
Geolocation GetPositionAsync never returns RRS feed

  • Question

  • User987 posted

    Consider the following code

    var loc = new Geolocator(this) { DesiredAccuracy = 50 }; var pos = await loc.GetPositionAsync(timeout: 4000);

    The await-code never returns. I have the correct permissions set and the location services is enabled on the phone. From looking at the code, I would expect it to return even with an invalid value.

    Also, checking the LocationStatus hangs the Geolocator.

    Any hints on what I'm doing wrong?

    Thanks

    Johan

    Wednesday, April 16, 2014 2:07 PM

All replies

  • User44709 posted

    It may be related to this issue: https://code.google.com/p/android/issues/detail?id=57707

    Try rebooting the device and trying again. If it works after rebooting, then this is likely your issue.

    Wednesday, April 16, 2014 2:27 PM
  • User987 posted

    Good tip!

    Rebooting the device helped... This is terrible since it can come back at any second. gah

    Wednesday, April 16, 2014 6:27 PM