Skip to main content

Use the reviewed permissions and integrations contract

Driver App permissions have at least four distinct states: what JavaScript requests, what the app declares, what the final native build effectively contains, and what the operating system reports at runtime. None can substitute for another.

The reviewed source has a permission-completeness defect and incomplete listener cleanup. This contract is source-only and does not certify effective grants, native/provider behavior or a deployed backend.

Availability

Requested location permissions vary by platform and Android OS version. The reviewed JavaScript asks iOS for when-in-use and always location. An intended Android 10 branch lists background location, activity recognition, fine and coarse location, but actual selection is not established because the version value and comparison type differ. Android 11 or newer requests activity recognition plus fine/coarse but omits background location from this list; older Android requests fine location only.

Native declarations include additional location, service, notification, vibration, contact and provider capabilities. Declaration does not prove a runtime request, grant, use, or final merged-manifest result.

Prerequisites

  • Inspect exact platform/OS requested set and final built native declarations.
  • Model unavailable, denied, blocked, limited and granted separately.
  • Require an awaited result for every required permission.
  • Provide lifecycle-safe listener cleanup and Settings-return recheck.
  • Review every integration—location, notification, maps, contact, photo library, sound, realtime and external navigation—under its own privacy/effect contract.

Responsibility boundaries

BoundaryResponsibilityLimit
Permission contextBuild OS-specific request list, check/request multiple, expose local status.Local status is not effective build authority.
Root permission setupRequest/check startup permissions and gate readiness.Reviewed aggregate check uses asynchronous predicates incorrectly and can mark grant before results resolve.
AppState recheckRecheck when app becomes active.Permission-context listener has no reviewed removal cleanup.
RequestPermissions UIExplain missing permission and offer Settings.Copy/Settings handoff does not prove grant or restart.
Native declarationsDeclare platform capabilities and provider integrations.Dependencies can merge/alter effective result.
OS/SettingsOwn prompts, blocked state and user choice.Returning to app is not success.
Provider integrationUse granted capabilities for location, push, maps, contact, photo/media, sound or realtime.Permission is not provider/API completion.

Inputs and result

Input/stateClient resultFailure boundary
OS/versionRequested list selected.Version parsing/build declarations can diverge.
Check multipleStatus map stored.Completeness requires every actual required item.
Request multiplePrompt/result map stored.Root aggregate bug can report grant prematurely.
Local all-grantedMap/background paths can be admitted.Effective permission/provider trust unproven.
Denied/blockedPermission UI or Settings handoff.Settings change/restart/return separate.
App becomes activeRecheck requested.Duplicate retained listener possible.
Integration mountNative/provider/API work can begin.Permission alone is not authorization or success.

Security and privacy

  • Request only permissions required for a documented purpose and active feature.
  • Never log permission tokens, provider IDs, precise location, contacts, media, messages or native response payloads.
  • Treat permission grant, data collection, API publication, provider use and retention as separate consents/authorizations.
  • Do not expose dormant native modules or source-only routes as public features.

Limits and failure states

StateMeaningMaintainer response
Async aggregate says grantedPredicate promises were treated truthy.Fix/await every result; no completeness claim.
Android 10 intended branchBackground/activity/fine/coarse is source-defined but actual selection is blocked by a version type mismatch.Fix type-safe selection and run Android 10 positive/negative tests; do not claim the combined set.
AppState listener retainedRechecks can duplicate after remount.Add cleanup and listener-count tests.
Settings openedOS owns next state.Recheck on return; no automatic success.
Native declaration without JS requestCapability is packaged but not necessarily requested/used.Keep separate.
Integration availableProvider can still fail or have side effects.Use integration-specific contract.

Troubleshooting

Diagnose requested list, declared manifest, effective built result, OS status, AppState listener count and provider/API state independently. Never use a real location, notification, call, photo or message to prove permission behavior.

Re-review whenever supported OS versions, requested lists, manifests, dependencies, startup aggregation, AppState cleanup, Settings flow or provider integration changes.

Related guides: Device permissions · Location permissions · Location validation · Background execution · Location contract · Notifications contract · Maps contract