Skip to main content

Use the reviewed location contract

Driver App location is not one capability. It includes device collection, one-shot reads, watches, in-memory route lines, map presentation, foreground publication, background-provider publication, status-embedded location, server storage/broadcast/trails, validation, mock policy and retention.

Keep each lane separate. Source presence or a passing client validation does not prove fresh, trusted, mock-safe, stored, broadcast, shared, retained or deployed location behavior.

Availability

Location work depends on effective platform permission, authenticated identity, project/status configuration, lifecycle, user availability, map/detail mount, provider readiness and connectivity. Several components start a one-shot read or watch on mount, before the Driver presses a location or status control.

Prerequisites

  • Product/privacy purpose and minimum-collection approval for each lane.
  • Effective iOS/Android permission and lifecycle review.
  • Current account/session generation and request authorization.
  • Explicit coordinate, timestamp, accuracy and mock provenance.
  • Server policy for normalization, freshness, mock handling, storage, availability broadcast, customer sharing, order trail and retention.
  • Deterministic watch/listener/provider cleanup and zero sensitive logs.

Responsibility boundaries

LaneClient responsibilityLimit
One-shot readAsk device provider for high-accuracy current position with timeout/cache inputs.Returned coordinate/timestamp/mock is not inherently trusted.
Foreground watchStart/stop position watch and update local route/current state.Multiple starts can overwrite one watch ID and leave an earlier watch.
Map mountRead/watch location and publish non-zero coordinate updates through client SDK.Mount/focus is effectful; no freshness/mock metadata in that save shape.
Delivery detail/formStart watch, validate selected statuses and optionally embed location in status request.Client pass is not server trust or status acceptance.
Root direct refreshRead device location and publish with authenticated Driver context.AppState/touch/provider callbacks can trigger it.
Background providerConfigure/start/stop tracking and HTTP callbacks from permission/token/user/language state.Setup/start/callback/cleanup are separate and currently cleanup-blocked.
APIAuthorize/normalize/mock-check/store/broadcast/trail according to lane/config.Running artifact mapping remains unknown.

Inputs and result

Input/statePossible resultCritical limit
Device coordinatesLocal latitude/longitude/speed/mock and sometimes timestampRoot and UI hooks produce different timestamp shapes.
Watch eventUpdate current location and append in-memory route lineAccuracy/provenance/retention and duplicate-watch cleanup unproven.
Map location updateSDK save with coordinate objectNo timestamp/mock in reviewed map save.
Direct/background publicationAuthenticated location request/provider HTTPStorage/broadcast/trail and mock/freshness differ by server lane.
Status locationLocation embedded with target statusCan skip separate timestamp/mock checks; trail failure need not fail status.
Client validationMissing/stale/target/distance issues or local passMock/accuracy/trust/server decision not established.
Unauthorized provider responseLocal logout intentSession/provider/API cleanup is partial.

Security and privacy

  • Never log or persist precise coordinates, route lines, raw provider/HTTP responses, tokens, addresses or account/order data in documentation evidence.
  • Treat collection, current/last storage, availability broadcast, customer sharing, order effects, history and retention as separate approvals.
  • Reject stale/unknown timestamp, insufficient accuracy and unreviewed mock provenance before trusted use.
  • Bind watches/callbacks/late results to the current account and screen lifecycle.
  • A simulator is not hermetic and mock location is not automatically safe.

Limits and failure states

StateMeaningMaintainer response
Missing/denied permissionClient/provider cannot use intended lane.No bypass; use permission contract.
Zero/missing coordinateHook normalization or no usable result.Do not publish/infer location.
Missing timestampSome hook/save lanes omit it.Do not call fresh.
Mock indicatorCaptured in some device/provider lanes.Client validation does not reject it; server policy required.
Watch started while not focusedMap mount effect can start before focus.Fix/test ownership and cleanup.
Multiple watch startsSingle stored watch ID can be overwritten.Prove every watch is cleared.
Status succeeds but trail failsC08 partial effect.Never equate primary write with durable trail.
Provider HTTP unauthorizedLocal logout intent.Reconcile location/session/provider cleanup.

Troubleshooting

SymptomInspectSafe diagnostic
Location updates before map is focusedMount/focus effects and watch countUse intercepted provider and listener ledger only.
Duplicate updatesMultiple follow calls, stored watch ID and cleanupCount synthetic watch registrations/clears.
Client says valid but location is doubtfulTimestamp, accuracy, mock provenance, target and server policyStop before status/publication.
Map and background locations differHook shapes, cache/timeout, provider, lifecycle and publication laneDo not reconcile with real coordinates.
Status changed without expected trailPrimary C05/C08 versus trail/storage/broadcast follow-onsEscalate to API/security owner; do not retry.

Re-review whenever permission, hook result shape, timestamp/mock/accuracy, watch/focus cleanup, map save, status validation, Root/background publication, server storage/broadcast/trail or retention changes.

Related guides: Location permissions · Location validation · Delivery map · Background execution · Maps contract