You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up to the tracking-architecture review (P3). For a continuous tracker, OEM background killers (Xiaomi/MIUI, Samsung OneUI "sleeping apps", Huawei PowerGenie) are a primary cause of dropped tracking, and they sit outside AOSP Doze/App-Standby APIs.
The app currently uses only Settings.ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS via BatteryOptimizationHelper (and deliberately avoids the REQUEST_IGNORE_BATTERY_OPTIMIZATIONS permission for Play caution).
Work items
Per-manufacturer guidance UI. Detect Build.MANUFACTURER and deep-link to the correct OEM screen (MIUI autostart, Samsung battery, Huawei protected apps) with concise instructions, following the dontkillmyapp.com patterns. Surface contextually from the tracking screen when a user-initiated session starts.
Battery-optimization exemption flow (decision). Evaluate offering ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS with a rationale on first user-initiated tracking. Google Play permits the REQUEST_IGNORE_BATTERY_OPTIMIZATIONS permission for apps whose core function requires continuous background work (continuous location tracking qualifies). This is a deliberate Play-policy trade-off — needs a decision, not just code.
Context
Follow-up to the tracking-architecture review (P3). For a continuous tracker, OEM background killers (Xiaomi/MIUI, Samsung OneUI "sleeping apps", Huawei PowerGenie) are a primary cause of dropped tracking, and they sit outside AOSP Doze/App-Standby APIs.
The app currently uses only
Settings.ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGSviaBatteryOptimizationHelper(and deliberately avoids theREQUEST_IGNORE_BATTERY_OPTIMIZATIONSpermission for Play caution).Work items
Build.MANUFACTURERand deep-link to the correct OEM screen (MIUI autostart, Samsung battery, Huawei protected apps) with concise instructions, following the dontkillmyapp.com patterns. Surface contextually from the tracking screen when a user-initiated session starts.ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONSwith a rationale on first user-initiated tracking. Google Play permits theREQUEST_IGNORE_BATTERY_OPTIMIZATIONSpermission for apps whose core function requires continuous background work (continuous location tracking qualifies). This is a deliberate Play-policy trade-off — needs a decision, not just code.PowerManager.isIgnoringBatteryOptimizations()(already wired) plus theApplicationExitInforeason added in PR feat(tracker): resilient user-session restart + previous-exit classification #222 to detect repeated OEM/SIGKILL exits and prompt the user with OEM guidance.Notes
minSdk 26means several legacy OEM tricks (e.g. the Huawei EMUI-4LocationManagerServicewakelock-tag hack) do not apply.References
Reference: report section P3 (§4); https://dontkillmyapp.com ; Doze battery-optimization exemption policy.