Permission QML Type

Handles the status of the app's capability permissions. More...

Import Statement: import ArcGIS.AppFramework.Platform 1.0

Methods

Detailed Description

The Permission component handles the returning of permissions provided to the app by the system. This component is a singleton, and does not need to be instantiated.

Be aware that the Permission component can't change these permissions. Changing permissions can only be done through the use of PermissionDialog.

Enumerations

PermissionType enumeration

Enum describing the permission being checked. Informs the parameter required for the checkPermission method.

NameValue
Permission.PermissionTypeBluetooth0
Permission.PermissionTypeCamera1
Permission.PermissionTypeMicrophone2
Permission.PermissionTypeLocationWhenInUse3
Permission.PermissionTypeLocationAlwaysInUse4
Permission.PermissionTypeStorage5
Permission.PermissionTypeMediaLocation6

PermissionResult enumeration

Enum describing the potential results of the checkPermission method.

The PermissionResultRestricted value means that the capability has not been enabled in the app's Settings tool.

NameValue
Permission.PermissionResultGranted0
Permission.PermissionResultDenied1
Permission.PermissionResultRestricted2
Permission.PermissionResultUnknown3

PermissionService enumeration

NameValue
Permission.BluetoothService0
Permission.LocationService1

ServiceStatus enumeration

NameValue
Permission.ServiceStatusUnknown0
Permission.ServiceStatusReset1
Permission.ServiceStatusUnsupported2
Permission.ServiceStatusUnauthorized3
Permission.ServiceStatusPoweredOff4
Permission.ServiceStatusPoweredOn5

Method Documentation

PermissionResult checkPermission(permissiontype type)

Check the status of a given capability permission. This will return the result, as informed by the PermissionResult enum.

This method will return PermissionResultUnknown for all permission types on Windows and macOS, and for the background location permission type on Android.

The type parameter

The capability permission to check the status of. Informed by the PermissionType enum.


ServiceStatus serviceStatus(permissionservice service)

Check real-time state of the device using a service such as location or Bluetooth, and return the result.

Label {
        id: locationServiceText
        text: "Location service status:" + Permission.serviceStatus(Permission.LocationService)
}

The service parameter

The state of the service. Informed by the PermissionService enum.

On Windows, macOS and Linux, this method will always return ServiceStatusUnknown for all service types.


Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.