Skip to content
This repository has been archived by the owner on Apr 3, 2023. It is now read-only.

Plugin.Permission UWP Issue #154

Open
DavidShochet opened this issue Aug 28, 2019 · 5 comments
Open

Plugin.Permission UWP Issue #154

DavidShochet opened this issue Aug 28, 2019 · 5 comments

Comments

@DavidShochet
Copy link

DavidShochet commented Aug 28, 2019

Bug Information

Version Number of Plugin: 3.0.0.12
Device Tested On:
Simulator Tested On: LATICRETE_MobileApp.UWP ‎(Universal Windows)
Version of VS: VS 2017 version 15.9.15
Version of Xamarin: Xamarin.Forms version 4.2.0.709249
Versions of other things you are using:

Steps to reproduce the Behavior

Call CrossPermissions.Current.CheckPermissionStatusAsync() anywhere in the shared project:

Expected Behavior

Should return the status

Actual Behavior

Throws an Exception "Server execution failed"

Code snippet

`
PermissionStatus permissionStatus = PermissionStatus.Unknown;

        try
        {
            permissionStatus = await CrossPermissions.Current.CheckPermissionStatusAsync(Permission.Location);`

This does not happen when I run in the native MainPage.xaml.cs:
var accessStatus = CheckLocationAsync();
where CheckLocationAsync is
` private async System.Threading.Tasks.Task<Plugin.Permissions.Abstractions.PermissionStatus> CheckLocationAsync()
{
var accessStatus = await Windows.Devices.Geolocation.Geolocator.RequestAccessAsync();

        switch (accessStatus)
        {
            case Windows.Devices.Geolocation.GeolocationAccessStatus.Allowed:
                return Plugin.Permissions.Abstractions.PermissionStatus.Granted;
            case Windows.Devices.Geolocation.GeolocationAccessStatus.Unspecified:
                return Plugin.Permissions.Abstractions.PermissionStatus.Unknown;

        }

        return Plugin.Permissions.Abstractions.PermissionStatus.Denied;
    }

`
Android and iOS have no problems.

@jamesmontemagno
Copy link
Owner

App23.zip
Can you try 5.0? I just did and didn't have any issues.

@DavidShochet
Copy link
Author

I am sorry, 5.0 is version of what? For PluginPermissions I see only 3.0.0.12 on NuGet, which I use.

@DavidShochet
Copy link
Author

I tried updated to 5.0, and result was the same. I ran your app, and got the same error:

image

@jamesmontemagno
Copy link
Owner

I ran the same app on my machine with no errors. Did you change anything or run in a different mode?

@DavidShochet
Copy link
Author

No, I did not change anything... Don't know what to think...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants