RPPermissionType enum
The OS permissions Research Package can request on behalf of a study.
A RPConsentSection lists the permissions its text justifies in RPConsentSection.permissions. They are requested in context — while the section explaining them is on screen — which is what both Apple and Google ask for.
Values
- location → const RPPermissionType
-
Access to the device location while the app is in the foreground.
- locationAlways → const RPPermissionType
-
Access to the device location also while the app is in the background.
Both platforms require the foreground permission to be granted first, so requesting this asks for location before escalating.
- microphone → const RPPermissionType
-
Access to the microphone, e.g. for audio recordings or noise sampling.
- camera → const RPPermissionType
-
Access to the camera.
- notification → const RPPermissionType
-
Permission to show notifications, e.g. survey reminders.
- activityRecognition → const RPPermissionType
-
Access to the recognized activity of the participant (walking, running, in a vehicle, ...).
- sensors → const RPPermissionType
-
Access to the body sensors of the device, e.g. heart rate.
- bluetooth → const RPPermissionType
-
Access to Bluetooth, e.g. for connecting to a wearable device.
- health → const RPPermissionType
-
Access to health data (Apple HealthKit / Android Health Connect).
Unlike the others this is not a single OS permission — both platforms authorise each health data type separately — so the section must also list the types it needs in RPConsentSection.healthDataTypes. Without them there is nothing to ask for and this resolves to RPPermissionStatus.unsupported.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- 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 - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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<
RPPermissionType> - A constant List of the values in this enum, in order of their declaration.