2.7 KiB
2.7 KiB
Location tracking QA checklist
Applies to the BackgroundGeolocation integration:
Goals
- Updates only when moved enough
- IDLE: record/upload only after moving ~200m.
- ACTIVE: record/upload after moving ~25m.
- Works in foreground, background and terminated (Android + iOS).
- Avoid uploads while stationary.
Current implementation notes
- Movement-driven recording only:
- IDLE uses
distanceFilter: 200(aim: no updates while not moving). - ACTIVE uses
distanceFilter: 25. - JS may request a persisted fix when entering ACTIVE (see
applyProfile()).
- IDLE uses
- Upload strategy is intentionally simple:
- Keep only the latest persisted geopoint:
maxRecordsToPersist: 1. - No batching / thresholds:
batchSync: false,autoSyncThreshold: 0. - When authenticated, each persisted location should upload immediately via native HTTP (works while JS is suspended).
- Pre-auth: tracking may persist locally but
urlis empty so nothing is uploaded until auth is ready.
- Keep only the latest persisted geopoint:
Basic preconditions
- Location permissions: foreground + background granted.
- Motion permission granted.
- Network reachable.
Foreground behavior
IDLE (no open alert)
- Launch app, ensure no open alert.
- Stay stationary for 5+ minutes.
- Expect: no repeated server updates.
- Walk/drive ~250m.
- Expect: at least one location persisted + uploaded.
ACTIVE (open alert)
- Open an alert owned by the current user.
- Move ~30m.
- Expect: at least one location persisted + uploaded.
- Continue moving.
- Expect: periodic updates roughly aligned with movement, not time.
Background behavior
IDLE
- Put app in background.
- Stay stationary.
- Expect: no periodic uploads.
- Move ~250m.
- Expect: a persisted record and upload.
ACTIVE
- Put app in background.
- Move ~30m.
- Expect: updates continue.
Terminated behavior
Android
- Ensure tracking enabled and authenticated.
- Force-stop the app task.
- Move ~250m in IDLE.
- Expect: native service still records + uploads.
- Move ~30m in ACTIVE.
- Expect: native service still records + uploads.
iOS
- Swipe-kill the app.
- Move significantly (expect iOS to relaunch app on stationary-geofence exit).
- Expect: tracking resumes and uploads after movement.
Debugging tips
- Observe logs in app:
tracking_ctxextras are updated on AppState changes and profile changes.- See
updateTrackingContextExtras().
- Correlate:
onLocationeventsonHttpevents- pending queue (
BackgroundGeolocation.getCount()in logs)