Home Assistant Android version:
1.11.2-2-gf468ece-223
Android version:
9
Phone model:
Motorola G7 Plus
Home Assistant version:
0.113
Last working Home Assistant release (if known):
Description of problem:
I've setup the Tasker to request a location update like described in this guide:
https://companion.home-assistant.io/docs/core/location#sending-an-intent
but it doesn't work.
Traceback (if applicable):
From logcat:
07-30 17:25:00.169 2000 7551 W BroadcastQueue: Background execution not allowed: receiving Intent { act=io.homeassistant.companion.android.background.REQUEST_ACCURATE_UPDATE flg=0x10 } to io.homeassistant.companion.android/.background.LocationBroadcastReceiver
Screenshot of problem:
Additional information:
You need to make sure the app was not prematurely stopped before sending the broadcast. Try to launch the app and then try it again.
@dshokouhi
Try to launch the app and then try it again.
Already tried this before posting the bug report. Result is the same.
Did you make sure to disable battery optimisations for the app?
Did you make sure to disable battery optimisations for the app?
Yes, battery optimizations are disabled.

After quick googling I've found this: https://commonsware.com/blog/2017/04/11/android-o-implicit-broadcast-ban.html
It seems that some changes needed to support Android 8+.
@vampik seems there was an issue introduced recently...can you try again with the latest beta build and let us know if its working now?
@vampik seems there was an issue introduced recently...can you try again with the latest beta build and let us know if its working now?
@dshokouhi Do you mean a Play Store latest beta build? Because the issue persists in a self-made build
App version: 2.0.0-2-gd747afd-237-full
08-04 12:34:27.582 2051 2149 W BroadcastQueue: Background execution not allowed: receiving Intent { act=io.homeassistant.companion.android.background.REQUEST_ACCURATE_UPDATE flg=0x10 } to io.homeassistant.companion.android/.background.LocationBroadcastReceiver
Yea build 237 is the latest, thanks for double checking against the latest build.
We might be able to use an IntentService to get this fixed? Need to play around with it and see if that is a viable solution.
Or we might just need to add the package name to the broadcast intent....
@JBassett I think that did the trick at least for me..... @vampik can you try the suggestion up above?
--------- beginning of system
08-04 12:21:33.793 18490 18490 D LocBroadcastReceiver: Got single accurate location update: Location[fused GPS hAcc=12 et=+1d0h28m15s398ms alt=189.70001220703125 vAcc=2 sAcc=??? bAcc=??? {Bundle[mParcelledData.dataSize=52]}]
08-04 12:21:33.793 18490 18490 W LocBroadcastReceiver: Location not accurate enough on retry 1 of 5
I can update the docs accordingly
@vampik can you try the suggestion up above?
Thank you, it works now.
That is, sending the intent does work. But the intent itself doesn't work as expected.
08-05 03:31:50.831 12957 12957 D LocBroadcastReceiver: Got single accurate location update: Location[fused 55,637371,37,357052 hAcc=12 et=+2d11h35m11s629ms alt=201.8000030517578 vAcc=2 sAcc=??? bAcc=??? {Bundle[mParcelledData.dataSize=52]}]
08-05 03:31:50.831 12957 12957 W LocBroadcastReceiver: Location not accurate enough on retry 1 of 5
08-05 03:33:51.050 12957 12957 D LocBroadcastReceiver: Got single accurate location update: Location[fused 55,637371,37,357052 hAcc=12 et=+2d11h37m11s843ms alt=201.8000030517578 vAcc=2 sAcc=??? bAcc=??? {Bundle[mParcelledData.dataSize=52]}]
08-05 03:33:51.050 12957 12957 W LocBroadcastReceiver: Location not accurate enough on retry 2 of 5
08-05 03:46:56.353 16786 16786 D LocBroadcastReceiver: Got single accurate location update: Location[fused 55,637371,37,357052 hAcc=12 et=+2d11h50m17s153ms alt=201.8000030517578 vAcc=2 sAcc=??? bAcc=??? {Bundle[mParcelledData.dataSize=52]}]
08-05 03:46:56.353 16786 16786 W LocBroadcastReceiver: Location not accurate enough on retry 1 of 5
08-05 03:49:07.816 16786 16786 D LocBroadcastReceiver: Got single accurate location update: Location[fused 55,637371,37,357052 hAcc=12 et=+2d11h52m28s603ms alt=201.8000030517578 vAcc=2 sAcc=??? bAcc=??? {Bundle[mParcelledData.dataSize=52]}]
08-05 03:49:07.816 16786 16786 W LocBroadcastReceiver: Location not accurate enough on retry 2 of 5
2 retries and no actual location update. But I think this is a subject for another bug report which I'll create later.
For now I hotfixed this for myself by lowering the number of retries from 5 to 1.