Show / Hide Table of Contents

Class AN_PermissionsManager

Inheritance
System.Object
AN_PermissionsManager
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ToString()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: SA.Android.App
Assembly: cs.temp.dll.dll
Syntax
public static class AN_PermissionsManager

Methods

CheckSelfPermission(AMM_ManifestPermission)

Determine whether you have been granted a particular permission.

Declaration
public static AN_PackageManager.PermissionState CheckSelfPermission(AMM_ManifestPermission permission)
Parameters
Type Name Description
AMM_ManifestPermission permission

The name of the permission being checked.

Returns
Type Description
AN_PackageManager.PermissionState

RequestPermission(AMM_ManifestPermission, Action<AN_PermissionsRequestResult>)

Requests permissions to be granted to this application. These permissions must be requested in your manifest, they should not be granted to your app, and they should have protection level #PROTECTION_DANGEROUS dangerous, regardless whether they are declared by the platform or a third-party app.

Requests permissions to be granted to this application. These permissions must be requested in your manifest, they should not be granted to your app, and they should have protection level #PROTECTION_DANGEROUS dangerous, regardless whether they are declared by the platform or a third-party app.

If your app does not have the requested permissions the user will be presented with UI for accepting them. After the user has accepted or rejected the requested permissions you will receive a callback reporting whether the permissions were granted or not.

Note that requesting a permission does not guarantee it will be granted and your app should be able to run without having this permission.

Declaration
public static void RequestPermission(AMM_ManifestPermission permission, Action<AN_PermissionsRequestResult> callback)
Parameters
Type Name Description
AMM_ManifestPermission permission

The requested permission. Must me non-null and not empty.

Action<AN_PermissionsRequestResult> callback

Results of permission requests will be delivered vai this callback

RequestPermissions(AMM_ManifestPermission[], Action<AN_PermissionsRequestResult>)

Requests permissions to be granted to this application. These permissions must be requested in your manifest, they should not be granted to your app, and they should have protection level #PROTECTION_DANGEROUS dangerous, regardless whether they are declared by the platform or a third-party app.

Requests permissions to be granted to this application. These permissions must be requested in your manifest, they should not be granted to your app, and they should have protection level #PROTECTION_DANGEROUS dangerous, regardless whether they are declared by the platform or a third-party app.

If your app does not have the requested permissions the user will be presented with UI for accepting them. After the user has accepted or rejected the requested permissions you will receive a callback reporting whether the permissions were granted or not.

Note that requesting a permission does not guarantee it will be granted and your app should be able to run without having this permission.

Declaration
public static void RequestPermissions(AMM_ManifestPermission[] permissions, Action<AN_PermissionsRequestResult> callback)
Parameters
Type Name Description
AMM_ManifestPermission[] permissions

The requested permissions. Must me non-null and not empty.

Action<AN_PermissionsRequestResult> callback

Results of permission requests will be delivered vai this callback

ShouldShowRequestPermissionRationale(AMM_ManifestPermission)

Gets whether you should show UI with rationale for requesting a permission. You should do this only if you do not have the permission and the context in which the permission is requested does not clearly communicate to the user what would be the benefit from granting this permission.

For example, if you write a camera app, requesting the camera permission would be expected by the user and no rationale for why it is requested is needed. If however, the app needs location for tagging photos then a non-tech savvy user may wonder how location is related to taking photos. In this case you may choose to show UI with rationale of requesting this permission.

Declaration
public static bool ShouldShowRequestPermissionRationale(AMM_ManifestPermission permission)
Parameters
Type Name Description
AMM_ManifestPermission permission

A permission your app wants to request.

Returns
Type Description
System.Boolean
In This Article
Back to top Generated by DocFX