question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Background Location Updates not working anymore

See original GitHub issue

Home Assistant Android version: 3.0.2-full

Android version: 11 (Google Pixel 2), 9 (Xiaomi Mi A1)

Phone model: Google Pixel 2 and Xiaomi Mi A1

Home Assistant version: 0.118.1

Last working Home Assistant release (if known): Android 2.5.0-full

Description of problem: The problem is, that the App is not anymore pushing the location (in certain intervals) when I don’t use the phone. The location will only be updated, if I use the phone. Turn on the lock screen, is sufficient to get a location update. I go daily for a walk of about 1-2h where I don’t use my phone and my location is not updated in the mean time. Previously the location was updated in an certain interval (I think it was every 15 minutes)

Traceback (if applicable):


Screenshot of problem:

Additional information: I have already read the steps under https://companion.home-assistant.io/docs/troubleshooting/faqs/#location-is-not-updating-in-android-app and everything is activated.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:24 (18 by maintainers)

github_iconTop GitHub Comments

1reaction
dshokouhicommented, Dec 2, 2020

you don’t need to enable debugging the logs will always be there, you may need to use Android Studio to properly show verbose logging or you can try some of the commands from: https://developer.android.com/studio/command-line/logcat

Edit: look for lines that start with: 2020-12-02 11:48:21.476 7380-7380/? D/LocBroadcastReceiver: Begin evaluating if location update should be skipped

Then a couple lines later you should be able to see the decision making process like:

2020-12-02 11:48:21.476 7380-7380/? D/LocBroadcastReceiver: Begin evaluating if location update should be skipped
2020-12-02 11:48:21.477 7380-7380/? D/LocBroadcastReceiver: Received location that is 65 milliseconds old, 1606938501411 compared to 1606938501476 with source fused
2020-12-02 11:48:21.477 7380-7380/? D/LocBroadcastReceiver: Duplicate location received, not sending to HA

this is taken from the play store version of the app too, but I am using android studio which by default gets verbose logging

1reaction
dshokouhicommented, Dec 2, 2020

We did not have any changes around location tracking itself so I am not sure how it correlates to those versions. This might be a play services issue or google just sending us invalid time. If possible please grab the ADB logs for about 15 minutes and we can see what reports are being ignored, if any. I personally do not have this issue on my Pixel 4 XL and neither does my wifes phone on a Pixel 3 XL.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Handling location updates in the background - Apple Developer
Handling location updates in the background. Configure your app to receive location updates when it isn't running in the foreground.
Read more >
Background Location Limits | Android Developers
Consider whether your app's use cases for running in the background cannot succeed at all if your app receives infrequent location updates.
Read more >
Top 7 Ways to Fix Live Location Not Updating on Android and ...
Your phone won't update your live location if the app you're use to share your location stops working in the background.
Read more >
After 15 mins Background Location update is not working in ios?
(You must manually restart location services in the background before any pending location updates can be delivered, as described in Knowing ...
Read more >
Notifications when your shared location is updated - Android
There are ways to make sure your location is updating in the background. ... Note: If there are problems, you'll see a warning...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found