The Android XR SDK is now available in Developer Preview. We want your feedback! Visit our
support page to reach out.
Stay organized with collections
Save and categorize content based on your preferences.
AndroidXRPermissionUtil
Utility component to help manage runtime permission requests.
Summary
Inheritance
Inherits from:
MonoBehaviour
Public attributes
GenernalAndroidPermissions
List< string > GenernalAndroidPermissions = new List()
A list of general Android permissions to request at runtime.
PermissionRationale
string PermissionRationale = "Required to enable Android XR feature at runtime."
The rationale of requesting Android permissions.
Public functions
AllPermissionGranted
bool AllPermissionGranted()
Checks if all permissions are granted at runtime.
Details |
Returns
|
A bool to indicate that all permissions are granted at runtime.
|
IsPerimssionGranted
bool IsPerimssionGranted(
string permission
)
Checks if the given permission is granted at runtime.
Details |
Parameters |
permission
|
The permission to check.
|
|
Returns
|
A bool to indicate that the permission is granted at runtime.
|
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-05-08 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-05-08 UTC."],[],[],null,["# AndroidXRPermissionUtil Class Reference\n\nAndroidXRPermissionUtil\n=======================\n\nUtility component to help manage runtime permission requests.\n\nSummary\n-------\n\n### Inheritance\n\nInherits from: `MonoBehaviour`\n\n| ### Public attributes ||\n|-----------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [AndroidXRPermissions](#androidxrpermissions)` = new List`() | `List\u003c `[AndroidXRPermission](/develop/xr/unity/reference/namespace/Google/XR/Extensions#androidxrpermission)` \u003e` A list of [AndroidXRPermissions](/develop/xr/unity/reference/class/Google/XR/Extensions/AndroidXRPermissionUtil#androidxrpermissions) to request at runtime. |\n| [GenernalAndroidPermissions](#genernalandroidpermissions)` = new List`() | `List\u003c string \u003e` A list of general Android permissions to request at runtime. |\n| [PermissionRationale](#permissionrationale)` = \"Required to enable Android XR feature at runtime.\"` | `string` The rationale of requesting Android permissions. |\n\n| ### Public functions ||\n|------------------------------------------------------------------|--------------------------------------------------------------|\n| [AllPermissionGranted](#allpermissiongranted)`()` | `bool` Checks if all permissions are granted at runtime. |\n| [IsPerimssionGranted](#isperimssiongranted)`(string permission)` | `bool` Checks if the given permission is granted at runtime. |\n\nPublic attributes\n-----------------\n\n### AndroidXRPermissions\n\n```c#\nList\u003c AndroidXRPermission \u003e AndroidXRPermissions = new List()\n``` \nA list of [AndroidXRPermissions](/develop/xr/unity/reference/class/Google/XR/Extensions/AndroidXRPermissionUtil#androidxrpermissions) to request at runtime. \n\n### GenernalAndroidPermissions\n\n```c#\nList\u003c string \u003e GenernalAndroidPermissions = new List()\n``` \nA list of general Android permissions to request at runtime. \n\n### PermissionRationale\n\n```c#\nstring PermissionRationale = \"Required to enable Android XR feature at runtime.\"\n``` \nThe rationale of requesting Android permissions.\n\nPublic functions\n----------------\n\n### AllPermissionGranted\n\n```c#\nbool AllPermissionGranted()\n``` \nChecks if all permissions are granted at runtime.\n\n\n| Details ||\n|-------------|-----------------------------------------------------------------|\n| **Returns** | A bool to indicate that all permissions are granted at runtime. |\n\n### IsPerimssionGranted\n\n```c#\nbool IsPerimssionGranted(\n string permission\n)\n``` \nChecks if the given permission is granted at runtime.\n\n\n| Details ||\n|-------------|-----------------------------------------------------------------------------------------|\n| Parameters | |--------------|--------------------------| | `permission` | The permission to check. | |\n| **Returns** | A bool to indicate that the permission is granted at runtime. |"]]