OkapiPermission enum

Every permission Okapi can check and request.

The name of each value is the exact identifier sent to the native side, so never rename values without updating the Kotlin and Swift code.

Inheritance
Available extensions

Values

camera → const OkapiPermission

Camera. Android CAMERA, iOS NSCameraUsageDescription.

const OkapiPermission(OkapiPlatformSupport.both, OkapiRequestKind.runtimeDialog)
microphone → const OkapiPermission

Microphone. Android RECORD_AUDIO, iOS NSMicrophoneUsageDescription.

const OkapiPermission(OkapiPlatformSupport.both, OkapiRequestKind.runtimeDialog)
speech → const OkapiPermission

Speech recognition. Android RECORD_AUDIO, iOS NSSpeechRecognitionUsageDescription.

const OkapiPermission(OkapiPlatformSupport.both, OkapiRequestKind.runtimeDialog)
photos → const OkapiPermission

Photos. Android 13+ READ_MEDIA_IMAGES (14+ also handles the "selected photos only" choice as OkapiStatus.limited), older Android READ_EXTERNAL_STORAGE. iOS read/write photo library.

const OkapiPermission(OkapiPlatformSupport.both, OkapiRequestKind.runtimeDialog)
photosAddOnly → const OkapiPermission

iOS add-only photo library access (save images without reading).

const OkapiPermission(OkapiPlatformSupport.iosOnly, OkapiRequestKind.runtimeDialog)
videos → const OkapiPermission

Videos. Android 13+ READ_MEDIA_VIDEO; iOS uses the photo library.

const OkapiPermission(OkapiPlatformSupport.both, OkapiRequestKind.runtimeDialog)
audio → const OkapiPermission

Audio files. Android 13+ READ_MEDIA_AUDIO. On iOS use mediaLibrary for the Apple Music library.

const OkapiPermission(OkapiPlatformSupport.androidOnly, OkapiRequestKind.runtimeDialog)
storage → const OkapiPermission

Legacy shared storage. Android 12 and below only (READ_EXTERNAL_STORAGE, plus WRITE_EXTERNAL_STORAGE up to Android 9). On Android 13+ this is notApplicable: use photos, videos, audio.

const OkapiPermission(OkapiPlatformSupport.androidOnly, OkapiRequestKind.runtimeDialog)
manageExternalStorage → const OkapiPermission

"All files access" (Android 11+ MANAGE_EXTERNAL_STORAGE). Google Play restricts this permission; only request it if your app qualifies under Play policy.

const OkapiPermission(OkapiPlatformSupport.androidOnly, OkapiRequestKind.specialSettingsScreen)
mediaLocation → const OkapiPermission

Location metadata inside photos (Android 10+ ACCESS_MEDIA_LOCATION).

const OkapiPermission(OkapiPlatformSupport.androidOnly, OkapiRequestKind.runtimeDialog)
mediaLibrary → const OkapiPermission

Apple Music / media library (iOS NSAppleMusicUsageDescription).

const OkapiPermission(OkapiPlatformSupport.iosOnly, OkapiRequestKind.runtimeDialog)
location → const OkapiPermission

Foreground location. Same as locationWhenInUse.

const OkapiPermission(OkapiPlatformSupport.both, OkapiRequestKind.runtimeDialog)
locationWhenInUse → const OkapiPermission

Foreground location. Android fine + coarse; "approximate only" is reported as OkapiStatus.limited. iOS when-in-use (reduced accuracy is reported as OkapiStatus.limited).

const OkapiPermission(OkapiPlatformSupport.both, OkapiRequestKind.runtimeDialog)
locationAlways → const OkapiPermission

Background location. Android 10+ ACCESS_BACKGROUND_LOCATION (the user must grant foreground location first; Okapi enforces this order). iOS "Always".

const OkapiPermission(OkapiPlatformSupport.both, OkapiRequestKind.runtimeDialog)
notification → const OkapiPermission

Notifications. Android 13+ POST_NOTIFICATIONS; below 13 the status is read from the system notification switch. iOS alert/badge/sound; provisional authorisation is reported as OkapiStatus.provisional.

const OkapiPermission(OkapiPlatformSupport.both, OkapiRequestKind.runtimeDialog)
criticalAlerts → const OkapiPermission

iOS critical alerts (requires an Apple entitlement).

const OkapiPermission(OkapiPlatformSupport.iosOnly, OkapiRequestKind.runtimeDialog)
accessNotificationPolicy → const OkapiPermission

Do Not Disturb access (Android ACCESS_NOTIFICATION_POLICY).

const OkapiPermission(OkapiPlatformSupport.androidOnly, OkapiRequestKind.specialSettingsScreen)
contacts → const OkapiPermission

Contacts. Android READ_CONTACTS/WRITE_CONTACTS; iOS contacts (iOS 18 "limited contacts" is reported as OkapiStatus.limited).

const OkapiPermission(OkapiPlatformSupport.both, OkapiRequestKind.runtimeDialog)
calendarFullAccess → const OkapiPermission

Full calendar access (read + write). iOS 17+ full access.

const OkapiPermission(OkapiPlatformSupport.both, OkapiRequestKind.runtimeDialog)
calendarWriteOnly → const OkapiPermission

Write-only calendar access (add events without reading). iOS 17+.

const OkapiPermission(OkapiPlatformSupport.both, OkapiRequestKind.runtimeDialog)
reminders → const OkapiPermission

iOS Reminders.

const OkapiPermission(OkapiPlatformSupport.iosOnly, OkapiRequestKind.runtimeDialog)
phone → const OkapiPermission

Phone. Android READ_PHONE_STATE, CALL_PHONE and related, whichever your manifest declares.

const OkapiPermission(OkapiPlatformSupport.androidOnly, OkapiRequestKind.runtimeDialog)
sms → const OkapiPermission

SMS. Android SEND_SMS, READ_SMS, RECEIVE_SMS, whichever your manifest declares. Google Play restricts SMS permissions.

const OkapiPermission(OkapiPlatformSupport.androidOnly, OkapiRequestKind.runtimeDialog)
sensors → const OkapiPermission

Body sensors (Android BODY_SENSORS); iOS motion & fitness.

const OkapiPermission(OkapiPlatformSupport.both, OkapiRequestKind.runtimeDialog)
sensorsAlways → const OkapiPermission

Body sensors in the background (Android 13+ BODY_SENSORS_BACKGROUND).

const OkapiPermission(OkapiPlatformSupport.androidOnly, OkapiRequestKind.runtimeDialog)
activityRecognition → const OkapiPermission

Physical activity. Android 10+ ACTIVITY_RECOGNITION; iOS motion & fitness.

const OkapiPermission(OkapiPlatformSupport.both, OkapiRequestKind.runtimeDialog)
bluetooth → const OkapiPermission

Bluetooth. Android 12+ scan + connect; iOS Bluetooth.

const OkapiPermission(OkapiPlatformSupport.both, OkapiRequestKind.runtimeDialog)
bluetoothScan → const OkapiPermission

Android 12+ BLUETOOTH_SCAN. On iOS this maps to bluetooth.

const OkapiPermission(OkapiPlatformSupport.both, OkapiRequestKind.runtimeDialog)
bluetoothConnect → const OkapiPermission

Android 12+ BLUETOOTH_CONNECT. On iOS this maps to bluetooth.

const OkapiPermission(OkapiPlatformSupport.both, OkapiRequestKind.runtimeDialog)
bluetoothAdvertise → const OkapiPermission

Android 12+ BLUETOOTH_ADVERTISE. On iOS this maps to bluetooth.

const OkapiPermission(OkapiPlatformSupport.both, OkapiRequestKind.runtimeDialog)
nearbyWifiDevices → const OkapiPermission

Android 13+ NEARBY_WIFI_DEVICES.

const OkapiPermission(OkapiPlatformSupport.androidOnly, OkapiRequestKind.runtimeDialog)
appTrackingTransparency → const OkapiPermission

iOS 14+ App Tracking Transparency. Okapi automatically waits until the app is active before asking, which avoids the common "dialog never shows" bug.

const OkapiPermission(OkapiPlatformSupport.iosOnly, OkapiRequestKind.runtimeDialog)
ignoreBatteryOptimizations → const OkapiPermission

Ignore battery optimisations (REQUEST_IGNORE_BATTERY_OPTIMIZATIONS).

const OkapiPermission(OkapiPlatformSupport.androidOnly, OkapiRequestKind.specialSettingsScreen)
systemAlertWindow → const OkapiPermission

Display over other apps (SYSTEM_ALERT_WINDOW).

const OkapiPermission(OkapiPlatformSupport.androidOnly, OkapiRequestKind.specialSettingsScreen)
requestInstallPackages → const OkapiPermission

Install unknown apps (REQUEST_INSTALL_PACKAGES).

const OkapiPermission(OkapiPlatformSupport.androidOnly, OkapiRequestKind.specialSettingsScreen)
scheduleExactAlarm → const OkapiPermission

Exact alarms (Android 12+ SCHEDULE_EXACT_ALARM).

const OkapiPermission(OkapiPlatformSupport.androidOnly, OkapiRequestKind.specialSettingsScreen)
backgroundRefresh → const OkapiPermission

iOS Background App Refresh. Read-only: apps cannot request it.

const OkapiPermission(OkapiPlatformSupport.iosOnly, OkapiRequestKind.readOnly)

Properties

hashCode → int
The hash code for this object.
no setterinherited
hasService → bool
Whether this permission has a related system service that can be switched off globally (Location Services, Bluetooth).
no setter
index → int
A numeric identifier for the enumerated value.
no setterinherited
name → String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
requestKind → OkapiRequestKind
How the permission is obtained.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
support → OkapiPlatformSupport
Platforms where this permission exists.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

values → const List<OkapiPermission>
A constant List of the values in this enum, in order of their declaration.