-
- All Implemented Interfaces:
-
java.io.Serializable,kotlin.Comparable
public enum DoorstepPermissionState extends Enum<DoorstepPermissionState>
The grant state of one DoorstepPermission.
The vocabulary is shared with iOS's
DoorstepPermissionState— same names, same meanings — so host code that branches on it reads the same on both platforms. Not every state occurs on every platform: RESTRICTED is iOS-only today, and WHEN_IN_USE_ONLY is meaningful only for DoorstepPermission.LOCATION_ALWAYS.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description NOT_DECLAREDThe permission exists on this OS version but the host app's merged manifest does not declare it, so the OS would deny the request instantly without showing a dialog.
Distinct from UNAVAILABLE because this one is fixable by the host: add the
<uses-permission>entry. The iOS counterpart is a missingInfo.plistusage-description key.UNAVAILABLEDoes not exist on this OS version, or the hardware is absent (e.g. DoorstepPermission.NEARBY_WIFI_DEVICES below API 33, DoorstepPermission.BLUETOOTH_SCAN with no BLE radio). Nothing to request; not a failure.
RESTRICTEDBlocked by device policy / MDM / parental controls. iOS-only today.
PERMANENTLY_DENIEDRefused with no further prompt possible — only the OS Settings app can change it. Deep-link the user there; a request would return an immediate denial with no dialog.
On iOS every
.deniedlands here, because iOS never re-prompts.DENIEDAsked and refused, but another prompt is still possible (show a rationale first).
WHEN_IN_USE_ONLYForeground location is held but background location is not — i.e. the user chose "While using the app".
Only ever reported for DoorstepPermission.LOCATION_ALWAYS, and it means the same thing on iOS (
.authorizedWhenInUse). This is the state that makes the While-In-Use vs Always distinction impossible to miss: acheckPermissionsreader must never collapse it into GRANTED, because background collection and route geofencing do not work in it.NOT_DETERMINEDNever asked (as far as the SDK can tell): a request will show a dialog.
Android caveat that cannot be engineered away: after a permanent denial the OS reports exactly the same signals as "never asked" (
shouldShowRequestPermissionRationale == false, not granted). The SDK disambiguates with its own persisted "we have asked this" flag plus arationale == truesighting, so a permission that was permanently denied through the host's own launcher — never through the SDK — can still read as NOT_DETERMINED. See PermissionLogic.evaluate.GRANTEDHeld right now.
-
Method Summary
Modifier and Type Method Description final StringgetName()final IntegergetOrdinal()-
-
Method Detail
-
getOrdinal
final Integer getOrdinal()
-
-
-
-