HOCO B2B
Team tasksImad

MOB-10 — Location, maps & consent foundation

Permission and consent flow, location service with accuracy handling, tolerance check helper, Google Maps setup per flavor, launch of external navigation, GPS-off and out-of-tolerance states.

FieldDetails
Task codeMOB-10
PhaseP0 — Foundations (cadrage, UX/UI, architecture & contract)
Product scopeV1
StatusPlanned
StartWed 4 Nov 2026
DueThu 5 Nov 2026
ResponsibleImad — Mobile developer (Flutter)
Co-responsible—
Effort1.25 person-day(s) planned · 4 from scratch · size S
Area · appMobile foundation · mobile
Depends onMOB-05
UnblocksMDA-03, MDA-12
Milestones—

Summary

Permission and consent flow, location service with accuracy handling, tolerance check helper, Google Maps setup per flavor, launch of external navigation, GPS-off and out-of-tolerance states.

Description

Check-in, field sign-up and tour sampling all depend on reliable positions and on informed consent (GEO-03, FLD-07, FLD-15, SEC-07). Scope: hoco_maps — the permission and consent flow DA-04 explaining what is collected and when, a location service returning a GeoFix (lat, lng, accuracy, timestamp, isMocked) with an accuracy wait, a tolerance helper (150 m distance, accuracy ≤ 100 m, both from settings), Google Maps setup per flavor, launch of external navigation, and the GPS-off, permission-denied and out-of-tolerance states of DA-28. Background sampling is MDA-12 and the check-in screen is MDA-03. It needs from Anis the field settings exposed to the app (field.gpsToleranceMeters, field.gpsMaxAccuracyMeters, sampling policy, retention) and a way to record consent; Akram's DES-11 consent and DES-14 system-state frames. MDA-03, MDA-05, MDA-07 and MDA-12 call this package.

Subtasks

#SubtaskOwner
1ConsentScreen DA-04: plain-French explanation (positions taken only while a tour is « En cours », every 5 min or 200 m, kept 90 days), « J'accepte » before the system prompt; consent version and timestamp stored and sent to the server (endpoint to confirm with Anis)Imad
2PermissionService over geolocator/permission_handler: while-in-use location, notification permission for the foreground service, permanently-denied path to app settingsImad
3LocationService.getFix(): high accuracy, keep listening up to 20 s until accuracy ≤ field.gpsMaxAccuracyMeters, returns GeoFix with isMocked; last known fix for offline useImad
4ToleranceChecker: haversine distance to the point of sale, result {withinTolerance, distanceMeters, accuracyOk}; values from settings with 150 m / 100 m defaultsImad
5Google Maps per flavor: API keys restricted to package name + SHA-1 per flavor, manifest placeholders, HOCO map style, marker set (planned, done, not done, next)Imad
6ExternalNavigation.launch(lat, lng): google.navigation intent, Google Maps directions URL fallback, Waze if installedImad
7DA-28 states: « GPS désactivé » with open-settings action, permission denied, low accuracy with retry, out of tolerance with distance shown, mock location warning (GPS_MOCK_LOCATION)Imad
8Expose field settings (tolerance, accuracy, sampling, retention, allowOutOfToleranceCheckIn) to the delegate app via appConfig or delegate.profileAnis

Deliverables

  • packages/hoco_maps/lib/src/location/ (permission, location, tolerance)
  • packages/hoco_maps/lib/src/map/ (HocoMap widget, markers, style) and navigation launcher
  • apps/delegate/lib/src/features/consent/ (DA-04)
  • Google Cloud API keys per flavor, restricted

Acceptance criteria

  • The system location prompt never appears before the DA-04 explanation has been accepted (SEC-07)
  • getFix returns within 20 s with accuracy ≤ 100 m outdoors, or an explicit low-accuracy result the UI shows (GEO-03)
  • A fix 140 m from the point of sale is within tolerance and one at 160 m is not, with the default 150 m; changing the setting changes the result without a release (FLD-15)
  • GPS off, permission denied and mocked locations each show their DA-28 state with a recovery action
  • « Itinéraire » opens Google Maps navigation to the point of sale; without Google Maps a browser directions link opens (FLD-07)

Requirements covered

RequirementTitleRelease
GEO-03GPS capture standard (lat/lng, accuracy, timestamp) and distance computationV1
FLD-07Map and navigation: position, next destination with ETA and distance, external GPS navigation, arrival confirmation within toleranceV1
FLD-15Location policy: consent, frequency, tolerance and retention configurable and transparentV1
SEC-07Geolocation consent and transparency for delegatesV1
INT-01Maps provider (Google Maps or Mapbox) for maps, routes and geocodingV1

Screens

ScreenNameApp
DA-04Permissions & location consentDA
DA-28System states (offline, GPS off, out of tolerance, permission denied, forced update)DA

Test measures

  • Unit tests of ToleranceChecker (boundaries at 150 m, accuracy 101 m) and of the accuracy-wait logic with a fake position stream
  • Widget tests of the DA-28 states
  • Device test outdoors and indoors on two mid-range Android phones measuring time-to-fix and accuracy

Risks

  • Indoor accuracy in shops often exceeds 100 m — show the live accuracy, let the delegate step outside and retry, and rely on the justified out-of-tolerance check-in if the setting allows it
  • Maps API cost and key leakage — restrict keys per app signature and monitor quota in Google Cloud

KPI

  • Delivered by Thu 5 Nov 2026 within 1.25 person-day(s).
  • Every acceptance criterion above demonstrated before hand-off; linked requirements' acceptance criteria pass.
  • Zero open critical defects, permission gaps or data-integrity regressions at sign-off.

Generated from content/plan/tasks.json by scripts/generate-team-tasks.mjs. Dates are computed by the scheduler (Sunday–Thursday weeks, holidays excluded) — change the plan, not this page.

On this page