Package 

Enum DoorstepPermissionState

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      NOT_DECLARED

      The 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 missing Info.plist usage-description key.

      UNAVAILABLE

      Does 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.

      RESTRICTED

      Blocked by device policy / MDM / parental controls. iOS-only today.

      PERMANENTLY_DENIED

      Refused 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 .denied lands here, because iOS never re-prompts.

      DENIED

      Asked and refused, but another prompt is still possible (show a rationale first).

      WHEN_IN_USE_ONLY

      Foreground 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: a checkPermissions reader must never collapse it into GRANTED, because background collection and route geofencing do not work in it.

      NOT_DETERMINED

      Never 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 a rationale == true sighting, 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.

      GRANTED

      Held right now.

    • Method Summary

      Modifier and Type Method Description
      final String getName()
      final Integer getOrdinal()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait