Xamarin.CustomPermissions.Droid 1.0.0

There is a newer version of this package available.
See the version list below for details.
Install-Package Xamarin.CustomPermissions.Droid -Version 1.0.0
dotnet add package Xamarin.CustomPermissions.Droid --version 1.0.0
<PackageReference Include="Xamarin.CustomPermissions.Droid" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Xamarin.CustomPermissions.Droid --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Xamarin.CustomPermissions.Droid, 1.0.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Xamarin.CustomPermissions.Droid as a Cake Addin
#addin nuget:?package=Xamarin.CustomPermissions.Droid&version=1.0.0

// Install Xamarin.CustomPermissions.Droid as a Cake Tool
#tool nuget:?package=Xamarin.CustomPermissions.Droid&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

CustomPermission

A Xamarin wrapper binding around Android permission model

Usage

    using Subsystems.CustomPermissionsDroid.External;
    ....
    private CMPPermissionsProxy _permissionsProxy;
    ....
    _permissionsProxy = new CMPPermissionsProxy(this);
    _permissionsProxy.AddPermissionToWishList(Manifest.Permission.ReadContacts, "RCN");
    _permissionsProxy.AddPermissionToWishList(Manifest.Permission.ReadCalendar, "RCL");

    var lst = new List<string>();
    lst.Add("RCN");
    lst.Add("RCL");

    _permissionsProxy.CheckForListOfPermissions(lst, 0, (permissionInfoList, responseCallback) => 
    {

        var permissionsArray = CMPPermissionsProxy.ExtractPermissions(permissionInfoList);
        
        // Can show reasons here, if needed, before calling callback
        responseCallback.Invoke(permissionsArray?.ToList());

    });
    
    public override void OnRequestPermissionsResult(int requestCode, string[] permissions, Android.Content.PM.Permission[] grantResults)
    {
        Console.WriteLine("OnRequestPermissionsResult");
        
    }
  • MonoAndroid 8.1

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.1 474 10/22/2018
1.0.0 465 8/2/2018

1. Initial Release for CustomPermission.Droid componenet
2. Supports Android only