Guarantee that android keeps on retrieving sensor data
问题 I'm developing an app that tracks trips. After searching about this matter, I concluded that the best way to achieve this (continuously track the user's location) is to use a foreground service. In some cases is working quite well, but in some other cases (even with DOZE off), I get some time intervals in which the phone is completely still and I stop getting sensor data (either accelerometer or locations from fused location provider). This problem got worse when I tried it in an Android 9