509 timestamp gaps across 159 tracking sessions. That was the number we found when we finally audited what happens to our Android app when the OS kills it in the background.
We run a workforce tracking app on 30 BYOD Android devices. The app needs to record GPS coordinates every few minutes, even when the screen is off. The problem is that Android doesn't want your app running in the background. Between Doze mode, OEM battery optimisations, user force-stops, and reboots, there are at least five distinct ways your app can die without your code ever seeing an exception.
I wrote a preprint that formalises this into a measurement framework: a kill-cause taxonomy, an instrumentation specification, and a classification procedure. The paper and data are open access on Zenodo: DOI: 10.5281/zenodo.24262951 .
Five Ways Your App Dies
Most developers know about Doze. Fewer know about OEM kills. The taxonomy from the paper:
1. Doze Kill.…