Context
Follow-up to the tracking-architecture review (P2) and PR #223 (which added setMaxUpdateDelayMillis batching to the fused trigger).
These are larger battery/accuracy features that change the collection model and warrant on-device measurement (Battery Historian) rather than a small trigger tweak.
Work items
- Passive location for AMBIENT/STATIONARY. AMBIENT tier currently uses the non-GPS
AmbientCollectionTrigger. Add an opportunistic passive consumer (Priority.PRIORITY_PASSIVE / PRIORITY_NO_POWER) so stationary/low-motion periods still capture fixes computed by other apps at ~zero battery cost.
- Geofence wake-from-stationary. When the activity-recognition state goes STILL, register a 50–200 m exit geofence (
setNotificationResponsiveness ≈ 5 min) and drop continuous GPS; on GEOFENCE_TRANSITION_EXIT, escalate the tier and re-enable location updates. Pattern: transistorsoft background-geolocation motion model.
- Tier-aware priority. Thread the policy tier into
DynamicIntervalCollectionTrigger.updateInterval(...) so selectPriority() can return LOW_POWER/BALANCED/HIGH_ACCURACY per tier (currently only permission-based).
- Mid-session
BatteryAwarePolicy re-evaluation. BatteryAwarePolicy.adjustForBattery() is applied only at session start; re-evaluate as the battery drains so a long session caps the tier dynamically.
Validation
- Battery Historian before/after for a multi-hour walking + stationary session.
- Confirm route fidelity is acceptable with passive + geofence (timestamps preserved).
References
Reference: report section P2 (§4.3, §4.4); Android location battery-optimization docs; transistorsoft background-geolocation.
Context
Follow-up to the tracking-architecture review (P2) and PR #223 (which added
setMaxUpdateDelayMillisbatching to the fused trigger).These are larger battery/accuracy features that change the collection model and warrant on-device measurement (Battery Historian) rather than a small trigger tweak.
Work items
AmbientCollectionTrigger. Add an opportunistic passive consumer (Priority.PRIORITY_PASSIVE/PRIORITY_NO_POWER) so stationary/low-motion periods still capture fixes computed by other apps at ~zero battery cost.setNotificationResponsiveness ≈ 5 min) and drop continuous GPS; onGEOFENCE_TRANSITION_EXIT, escalate the tier and re-enable location updates. Pattern: transistorsoft background-geolocation motion model.DynamicIntervalCollectionTrigger.updateInterval(...)soselectPriority()can returnLOW_POWER/BALANCED/HIGH_ACCURACYper tier (currently only permission-based).BatteryAwarePolicyre-evaluation.BatteryAwarePolicy.adjustForBattery()is applied only at session start; re-evaluate as the battery drains so a long session caps the tier dynamically.Validation
References
Reference: report section P2 (§4.3, §4.4); Android location battery-optimization docs; transistorsoft background-geolocation.