I am working on xamarin forms. I am using xamarin.Essentials library to get the current location. In iOS it is working fine but in android it hangs the app when I call Geolocation.GetLastKnownLocationAsync(). Means after calling following line, it never returns.
var currentLocation = await Geolocation.GetLastKnownLocationAsync();
I have set all the permission in Android manifest file
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-feature android:name="android.hardware.location" android:required="false" />
<uses-feature android:name="android.hardware.location.gps" android:required="false" />
<uses-feature android:name="android.hardware.location.network" android:required="false" />
Does anyone know what might be the issue in calling GetLastKnownLocationAsync method? I am using version 1.5.3.2 of Xamarin.Essentials