# AndroidXRPermissionUtil

Utility component to help manage runtime permission requests.

## Summary

### Inheritance

Inherits from:`MonoBehaviour`

|                                                                                                                                                                                                                                                                 ### Public attributes                                                                                                                                                                                                                                                                  ||
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [AndroidXRPermissions](https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/AndroidXRPermissionUtil#androidxrpermissions)` = new List`()                                        | `List< `[AndroidXRPermission](https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#androidxrpermission)` >` A list of[AndroidXRPermissions](https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/AndroidXRPermissionUtil#androidxrpermissions)to request at runtime. |
| [GenernalAndroidPermissions](https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/AndroidXRPermissionUtil#genernalandroidpermissions)` = new List`()                            | `List< string >` A list of general Android permissions to request at runtime.                                                                                                                                                                                                                                                          |
| [PermissionRationale](https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/AndroidXRPermissionUtil#permissionrationale)` = "Required to enable Android XR feature at runtime."` | `string` The rationale of requesting Android permissions.                                                                                                                                                                                                                                                                              |

|                                                                                                           ### Public functions                                                                                                            ||
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------|
| [AllPermissionGranted](https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/AndroidXRPermissionUtil#allpermissiongranted)`()`                | `bool` Checks if all permissions are granted at runtime.     |
| [IsPerimssionGranted](https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/AndroidXRPermissionUtil#isperimssiongranted)`(string permission)` | `bool` Checks if the given permission is granted at runtime. |

## Public attributes

### AndroidXRPermissions

```c#
List< AndroidXRPermission > AndroidXRPermissions = new List()
```  
A list of[AndroidXRPermissions](https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/AndroidXRPermissionUtil#androidxrpermissions)to request at runtime.  

### GenernalAndroidPermissions

```c#
List< string > GenernalAndroidPermissions = new List()
```  
A list of general Android permissions to request at runtime.  

### PermissionRationale

```c#
string PermissionRationale = "Required to enable Android XR feature at runtime."
```  
The rationale of requesting Android permissions.

## Public functions

### AllPermissionGranted

```c#
bool AllPermissionGranted()
```  
Checks if all permissions are granted at runtime.

<br />

|                                   Details                                    ||
|-------------|-----------------------------------------------------------------|
| **Returns** | A bool to indicate that all permissions are granted at runtime. |

### IsPerimssionGranted

```c#
bool IsPerimssionGranted(
  string permission
)
```  
Checks if the given permission is granted at runtime.

<br />

|                                               Details                                                ||
|-------------|-----------------------------------------------------------------------------------------|
| Parameters  | |--------------|--------------------------| | `permission` | The permission to check. | |
| **Returns** | A bool to indicate that the permission is granted at runtime.                           |