mozilla / MozStumbler

Android Stumbler for Mozilla
http://location.services.mozilla.com
Mozilla Public License 2.0
619 stars 212 forks source link

Data collection stops when the screen is off #1861

Open kuba-orlik opened 5 years ago

kuba-orlik commented 5 years ago

The app stops gathering data once I lock the device's screen. Once I unlock my phone, everything goes back to normal

Djfe commented 5 years ago

which android version are you on?

this might be due to doze mode. try disabling battery optimization for MozStumbler

https://www.makeuseof.com/tag/androids-battery-optimization-harm-good/

kuba-orlik commented 5 years ago

I'm on Android 8.1.0.

I've already tried disabling battery optimizations

theopensourceguy commented 5 years ago

What device is it and are you on stock or a custom ROM? Some manufacturers implement their own battery optimizations that are a little, let's say... overprotective when it comes to battery usage.

It might also be, that Android Oreo and newer is not too happy about Stumbler not using notification channels and thus killing the foreground service that should be running while stumbling. I tried to fix this in PR #1862, but I'm not sure when (if at all) that'll be merged. Take this with a grain of salt, though, as I'm not too sure that's what's actually happening.

kuba-orlik commented 5 years ago

I'm on a custom ROM, MicrG+LineageOS