I am developing both and iOS and Android version that requires GPS using Xamarin.
On iOS it's working fine, however now developing the Android version I have some issues with the GPS. It does not fetch the GPS but times out. However, on a emulator (using Genymotion) it fetches a coordinate right away. Note that I am using the Xamarin.Mobile (latest plugin 0.7.5).
private async Task<HelpPosition> CreateGeolocator ()
{
int accuracy = SettingsManager.Instance.GetSettings ().Accuracy;
Geolocator locator = new Geolocator (this) { DesiredAccuracy = accuracy * 10 };
Position p = await locator.GetPositionAsync (timeout: 10000);
return new HelpPosition{ Latitude = p.Latitude, Longitude = p.Longitude };
}
This always code times out after 10s. I have set the ACCESS_COARSE_LOCATION and ACCESS_FINE_LOCATION permissions.
The issue seems only to occur when indoors. However Google Maps is perfectly fine getting my exact position. And I have checked all settings in Location Services (Use wireless networks and Use GPS satelites). The device is a Samsung Note 2.