# DevicePermissions

Namespace: **Wisej.Hybrid**

Assembly: **Wisej.Hybrid** (3.5.0.0)

Provides methods for interacting with device permissions, such as requesting, checking, and displaying rationale for permissions.

{% tabs %}
{% tab title="C#" %}

```csharp
public class DevicePermissions
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class DevicePermissions
```

{% endtab %}
{% endtabs %}

Access this class through the [Device](https://docs.wisej.com/hybrid/start/api/general/wisej.hybrid.device) singleton.

## Constructors

### ![](https://1168517704-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKLgWHTlbcMvpwVT7mLBW%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)DevicePermissions()

Initializes a new instance of [DevicePermissions](https://docs.wisej.com/hybrid/start/api/permissions/wisej.hybrid.devicepermissions).

## Methods

### ![](https://1168517704-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKLgWHTlbcMvpwVT7mLBW%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)Check(type)

Checks the status of the specified permission.

| Parameter | Type                                                                                                                 | Description                      |
| --------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------- |
| **type**  | [PermissionType](https://docs.wisej.com/hybrid/start/api/permissions/wisej.hybrid.shared.permissions.permissiontype) | The type of permission to check. |

**Returns:** [PermissionStatus](https://docs.wisej.com/hybrid/start/api/permissions/wisej.hybrid.modules.permissions.permissionstatus). The current permission status (e.g., granted, denied).

### ![](https://1168517704-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKLgWHTlbcMvpwVT7mLBW%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)Request(type)

Requests the specified permission from the user.

| Parameter | Type                                                                                                                 | Description                        |
| --------- | -------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
| **type**  | [PermissionType](https://docs.wisej.com/hybrid/start/api/permissions/wisej.hybrid.shared.permissions.permissiontype) | The type of permission to request. |

**Returns:** [PermissionStatus](https://docs.wisej.com/hybrid/start/api/permissions/wisej.hybrid.modules.permissions.permissionstatus). The permission status indicating whether the permission was granted or denied.

### ![](https://1168517704-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKLgWHTlbcMvpwVT7mLBW%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)ShouldShowRationale(type)

Determines if an educational user interface should be displayed to explain how the specified permission will be used in the application.

| Parameter | Type                                                                                                                 | Description                                    |
| --------- | -------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------- |
| **type**  | [PermissionType](https://docs.wisej.com/hybrid/start/api/permissions/wisej.hybrid.shared.permissions.permissiontype) | The type of permission to check for rationale. |

**Returns:** [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean). true if rationale should be shown; otherwise, false.
