android: Background Location Updates not working anymore

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.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 24 (18 by maintainers)

Most upvoted comments

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

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.