Android companion app does not stay running when losing focus

Every time I open Home Assistant companion app, and switch to something else, like simply going to “Home” on my phone, or switching to another open app… I can’t get back to Home Assistant. It disappears from the pool of opened apps. And it’s very frustrating.

I am guessing I am doing something wrong. In terms of Android configuration, I have everything setup so Home Assistant can use battery without restrictions, and the app blocker has all options disabled.

Is there something I should configure from within the app? I tried looking this issue up and found nothing specific to my case.

The companion sensors and actuators work absolutely fine. I’m just bothered by the fact that the app disappears from the quick app switcher and it has to load the UI again every time.

try opening the app from the launcher, the app does not add itself to the recent app list for certain actions as it may become duplicated which is required to ensure navigation works when accessed from different components like notifications and shortcuts

I always open the app from the launcher. The problem is that it closes automatically whenever I go somewhere else. It is very annoying having to reopen the app everytime and waste 5 seconds searching for the app and another 5 for loading up again.

Hi!

I just wanted to say that I fixed it!

So the problem was that I was launching the Android app from a specific shortcut I had set up, instead of clicking on the main app button. When launching the Home Assistant app from the main button, the app keeps itself up, and the problem completely dissapears.


A note on why I was launching the app in such complicated manner

Why was I doing this? Well, at the time I thought the only way to preserve the “Overview” control panel was by keeping it as the main panel. This is in fact still true nowadays (I don’t know why, honestly, seems pretty weird to see it disappear if you choose another panel as your “main”).

My workaround for this was: well, on my browser I can just switch my shortcut to my favourite panel I want to see when I click on “My Home Assistant”; but on the Android app I had to create a shortcut from within the app, that you can then drag an drop onto your launcher and make use of it like you are just launching the app (which, in a way, you are doing just that). Somehow that made it not persist after switching focus. I also don’t understand this, but there’s probably a reason for that.

Anyway, if anyone is interested, you can definitely setup your default panel as whatever you want and still keep the “Overview” one, you just have to create a new panel and set it up as an overview-type one. Yeah, it’s a bit confusing, but here’s the solution explained in another post in this forum.

Just wanted to add that you can also choose the default dashboard by device as well as per user. If you go to dashboards in settings there is an option for “make default on this device”.

I do wonder which wins. If I setup a user with default dashboard 1 on the user side, then log in as that user on a device who is an admin user and choose dashboard 2 to be the default on that device which ends up being the default dashboard, dashboard 1 set on the user side or dashboard 2 on the device side ?