Struggling to convince mobile app to update location (with details)

Hello friends! I am trying to set up manual remotely triggered location updates on Android, but I’m having trouble getting the app to actually send location updates. I’ve tried a lot of things so far, so I’ll try to list them all here and maybe someone can spot what I might have missed? Thanks for your time :slight_smile:

Context:

My wife and I want to be able to manually request a location update of the other’s device, so we can find each other when one is out on a walk. To be clear, this is a feature we both want to be able to use for practicality, there are no trust issues here. We don’t need continuous location updates, just on demand.

Current setup:

  • Device is an S22
  • Enabled HA background access
  • Disabled battery optimizations
  • Gave “all the time” location permission
  • In sensors settings, location, we have Background location enabled, and Single accurate location also enabled. Minimum time set to 10000ms.

In a custom dashboard, I’ve set up a tap action per device that calls service notify.[device], with ttl: 0 and priority: high, message request_location_update.

I know that the notification reaches the phone, because I can see it in the app’s notification history.

Issue:

Location is only updated if the app is awake, or if a zone changes.
If not, it doesn’t seem to update, even tho it does seem to receive request_location_update.
Sometimes it will work once.
If the device is plugged in, it might work more frequently.

I’m not sure what else I can try. Any ideas?

Settings > Companion App > Troubleshooting > Location tracking

what do the reports look like there? If there is a failure then you need to check logs under teh same troubleshooting section

1 Like

Also noticed you mention a Samsung device, keep in mind just granting background access is not enough for Samsung devices. They like to add things like Power Saving and other features that need to be disabled for teh app so it can run in the background.

oh nice, I didn’t know about this, I’ll check. Thanks!

I forgot to mention it, but I’ve also set power saving to unrestricted for HA. Is there any other setting I might be missing?

dontkillmyapp.com does a good job of calling out all the various settings to check but not sure if its up to date with latest OS changes

1 Like