docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ARCorePermissionManager

    Manages Android permissions for the application. Allows you to determine whether a permission has been granted and request permission.

    Inheritance
    object
    AndroidJavaProxy
    ARCorePermissionManager
    Inherited Members
    AndroidJavaProxy.javaInterface
    AndroidJavaProxy.Invoke(string, object[])
    AndroidJavaProxy.Invoke(string, AndroidJavaObject[])
    AndroidJavaProxy.Invoke(string, IntPtr)
    AndroidJavaProxy.equals(AndroidJavaObject)
    AndroidJavaProxy.hashCode()
    AndroidJavaProxy.toString()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.XR.ARCore
    Assembly: Unity.XR.ARCore.dll
    Syntax
    public class ARCorePermissionManager : AndroidJavaProxy

    Methods

    CancelPermissionRequest()

    Cancels any pending Android permission requests.

    Declaration
    public static void CancelPermissionRequest()

    IsPermissionGranted(string)

    Checks if an Android permission is granted to the application.

    Declaration
    public static bool IsPermissionGranted(string permissionName)
    Parameters
    Type Name Description
    string permissionName

    The full name of the Android permission to check (e.g. android.permission.CAMERA).

    Returns
    Type Description
    bool

    true if permissionName is granted to the application. Otherwise, false.

    RequestPermission(string, Action<string, bool>)

    Requests an Android permission from the user.

    Declaration
    public static void RequestPermission(string permissionName, Action<string, bool> callback)
    Parameters
    Type Name Description
    string permissionName

    The permission to request (e.g. android.permission.CAMERA).

    Action<string, bool> callback

    A delegate to invoke when the permission has been granted or denied. The parameters of the delegate are the permissionName being requested and a bool indicating whether permission was granted.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)