Skip to main content

Location Permissions


Use Location Permissions to request location access when the app needs the user location to show nearby doctors and relevant care options. y



This screen includes:

#ElementDescription
1Permission modalRequests access to the user location.
2Permission titleDisplays Allow Air Doctor to use your location?
3Permission messageExplains that location access helps show nearby doctors and relevant care.
4Map previewShows the approximate location area on a map.
5Allow once actionGrants temporary location access for the current session.
6Allow while using app actionGrants location access while the app is in use.
7Deny actionBlocks location access and closes the permission request.

Workflow

  1. Open a flow that requires location access.
  2. Display the location permission modal when access is unavailable.
  3. Select Allow Once, Allow While Using App, or Don’t allow.
  4. Submit the permission result.
  5. Continue the current flow when location access is available.
  6. Display a fallback state when location access remains unavailable.

Validations

ScenarioApp BehaviorSDK Output
Session invalidBlock permission updatestate = unauthenticated
Location access availableContinue the current flowlocationPermission = granted
Location access deniedDisplay the location permission modallocationPermission = denied
Location access unavailableDisplay the location permission modallocationPermission = unavailable
Permission result acceptedContinue with location-based resultsstate = updated
Permission result rejectedPreserve the current flow statestate = unchanged
Permission update failsDisplay error statestate = error

Actions

ScenarioApp BehaviorSDK Output
Location permission requiredRequest location permission contentPUT /api/v3/location-permission
Allow Once selectedSubmit temporary permission accesspermission = allow_once
Allow While Using App selectedSubmit app-use permission accesspermission = allow_while_using_app
Don’t allow selectedSubmit denied permission accesspermission = denied
Permission result changedProcess permission resultPATCH /api/v3/location-permission/update
Update succeedsContinue the correct flow for the current contextstate = updated
Update rejectedPreserve the current statestate = unchanged

Endpoint Resources

PUT 

Location Permissions

v3/location-permission

Displays a location permission popup when location access is denied and requests the required permission to continue.

Permission Request

PATCH 

v3/location-permission/update

Processes the location permission result and continues the correct flow based on context.