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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#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
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");
}
Product | Versions 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.
1. Icon udpated