Forum Xamarin.Forms
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Incorrect permission status on Android For Xamarin Forms

dharam_devdharam_dev USMember ✭✭

The plugin returns Denied on Android when you haven't even asked the user for the permission. The same situation on iOS returns Unknown, which makes more sense.

var status = await CrossPermissions.Current.CheckPermissionStatusAsync(permissions);

here status is Denied in Android in initial state while in iOS it return Unknown

Best Answer




    these permission are correct and you can use following code for also find status for ios:
    var newStatus = await CrossPermissions.Current.RequestPermissionsAsync(Permission.Location);
    after this you get a popup and then you can find the status easily :)

  • dharam_devdharam_dev USMember ✭✭

    @SHUBHAMSHARMA_2927 Thanks For Reply,

    but i'm asking about inital situation where you never ask to user for permission and just check the status for particular permission i.e. Location,Storage,Phone, this status is show Denied in only Android Platform while instead of Unknown , it's working fine in iOS.

    any advice and suggestions will be greatly appreciated

    Thanks in Advance :smile:



    May be i am not sure but when i have install an app which want these type of permission and in my phone then i come on this result that droid platform is autometically set status to denied mode beacouse the feature which want that permission and system information about that app are react like they are denied....

  • JoeMankeJoeManke USMember ✭✭✭✭✭

    On Android, the only way you get a status of Unknown is if you call CheckPermissionStatusAsync for a permission that is not in your manifest, or you do not have the CurrentActivity plugin properly configured. There is no concept of "not having asked yet" on Android, it's either Granted or Denied.

  • dharam_devdharam_dev USMember ✭✭
    Accepted Answer

    @SHUBHAMSHARMA_2927 @JoeMake
    Thanks for Reply

    Now, I Handled Permissions in different way for Android in my Forms Projects.
    Thanks Again :)

Sign In or Register to comment.