According to Android 12 documentation a user can grant only approximate location (ACCESS_COARSE_LOCATION) even while your app requests ACCESS_FINE_LOCATION. When a geolocation request is made the app throws an exception stating that Permissions.LocationWhenInUse is not granted, although it doesn't have to be granted on Android 12 in order to get approximate location.
Description
According to Android 12 documentation a user can grant only approximate location (ACCESS_COARSE_LOCATION) even while your app requests ACCESS_FINE_LOCATION. When a geolocation request is made the app throws an exception stating that Permissions.LocationWhenInUse is not granted, although it doesn't have to be granted on Android 12 in order to get approximate location.
https://developer.android.com/training/location/permissions#approximate-request
Steps to Reproduce
Expected Behavior
Code should use provided approximate location (ACCESS_CORASE_LOCATION) in order to pull a user's current location (as it is provided by Android 12)
I believe that code in line 259 of https://github.com/xamarin/Essentials/blob/e054b7e19b7fb8f1787af41c95ce4447660422ed/Xamarin.Essentials/Permissions/Permissions.android.cs#L259 should return PermissionStatus.Granted.
The issue is related to another bug reported a few days ago https://github.com/xamarin/Essentials/issues/2009
Actual Behavior
Code throws an exception stating that LocationWhenInUse is not provided.
Basic Information