You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 3, 2023. It is now read-only.
Version Number of Plugin: 3.0.0.12
Device Tested On: Windows 10 Dell Laptop, Panasonic Toughpad Windows 10
Simulator Tested On: N/A
Version of VS: 16.3.2
Version of Xamarin.Forms: 4.3.0.991211
Versions of other things you are using:
Plugin.CurrentActivity v2.1.0.4
Xam.Plugin.Geolocator v.4.5.0.6
Xamarin.Forms.Maps v.4.1.0.618606
Steps to reproduce the Behavior
Call CrossPermissions.Current.RequestPermissionAsync(Permission.Location) anywhere in the shared project.
Expected Behavior
Should return the <Permission,PermissionStatus> and re-prompt the user to grant/deny the permission.
Actual Behavior
UWP only: If using RequestPermissionAsync(Permission.Location), the call will always return a PermissionStatus.Granted even when the user has already denied the permissions. The user will NOT be re-prompted to grant/deny location permissions.
Per the above screenshot, it appears the UWP implementation of RequestPermissionAsync() is going to always return PermissionStatus.Granted.
How we are using this:
` public async Task CheckandRequestDevicePermission(PermissionType XAMpermissionType)
{
var XAMpermissionStatus = await CheckPermissionStatusAsync(XAMpermissionType);
if (XAMpermissionStatus != CurrentPermissionStatus.Granted)
{
var grantResults = await _pluginPermission.RequestPermissionsAsync(new Plugin.Permissions.Abstractions.Permission[] { PermissionTypeConverter(XAMpermissionType) });
foreach (var item in grantResults.Keys)
if (grantResults[item] != Plugin.Permissions.Abstractions.PermissionStatus.Granted)
{
return false;
}
}
return true;
}`
The text was updated successfully, but these errors were encountered:
landre14
changed the title
UWP: RequestPermissionAsync(Location) always returns "Granted"
UWP: RequestPermissionAsync(Location) always returns PermissionStatus.Granted
Jan 3, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Bug Information
Version Number of Plugin: 3.0.0.12
Device Tested On: Windows 10 Dell Laptop, Panasonic Toughpad Windows 10
Simulator Tested On: N/A
Version of VS: 16.3.2
Version of Xamarin.Forms: 4.3.0.991211
Versions of other things you are using:
Plugin.CurrentActivity v2.1.0.4
Xam.Plugin.Geolocator v.4.5.0.6
Xamarin.Forms.Maps v.4.1.0.618606
Steps to reproduce the Behavior
Call CrossPermissions.Current.RequestPermissionAsync(Permission.Location) anywhere in the shared project.
Expected Behavior
Should return the <Permission,PermissionStatus> and re-prompt the user to grant/deny the permission.
Actual Behavior
UWP only: If using RequestPermissionAsync(Permission.Location), the call will always return a PermissionStatus.Granted even when the user has already denied the permissions. The user will NOT be re-prompted to grant/deny location permissions.
Code snippet
From the Plugin Permissions.UWP.cs code:
Per the above screenshot, it appears the UWP implementation of RequestPermissionAsync() is going to always return PermissionStatus.Granted.
How we are using this:
` public async Task CheckandRequestDevicePermission(PermissionType XAMpermissionType)
{
var XAMpermissionStatus = await CheckPermissionStatusAsync(XAMpermissionType);
The text was updated successfully, but these errors were encountered: