What Are The Background Location Limits In Android 8 (oreo)?
Solution 1:
Quite an old question now but I've spent alot of time recently trying to get an app like this to work. I had a perfect app in older Android versions but it now seems impossible.
The answer will probably vary depending on devices but with my Galaxy S7 units (Oreo) I can set the location going as often as I want to, even every 5 seconds. But afer 45-60 minutes of idle, the service will just slow down, until the app is brought into the forground manually again.
I have tried Job Scheduler, Worker, AlarmManager, AlarmManager with Wake Lock and with 'setAndAllowWhileIdle()', and they all give the same results: fully active location changes for 45 minutes or so, than only once every 15 minutes or so (if you're lucky: it can be more than an hour and seems unpredictable)
[edit, a year later] I have managed to improve this now, by restarting the (background) location service every hour (using an alarm), updates continue every 2 minutes as requested (for over a week now...) - but only if the device is either powered up or moving. If on battery, and the location isn't changing, updates revert to every hour or so. Same on android 11. See my new question here
Post a Comment for "What Are The Background Location Limits In Android 8 (oreo)?"