Xamarin.CustomPermissions.Droid 1.0.1

dotnet add package Xamarin.CustomPermissions.Droid --version 1.0.1                
NuGet\Install-Package Xamarin.CustomPermissions.Droid -Version 1.0.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Xamarin.CustomPermissions.Droid" Version="1.0.1" />                
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.1                
#r "nuget: Xamarin.CustomPermissions.Droid, 1.0.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. 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.1

// Install Xamarin.CustomPermissions.Droid as a Cake Tool
#tool nuget:?package=Xamarin.CustomPermissions.Droid&version=1.0.1                

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");
        
    }
Product Compatible and additional computed target framework versions.
MonoAndroid monoandroid90 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • MonoAndroid 9.0

    • 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 878 10/22/2018
1.0.0 817 8/2/2018

1. Icon udpated