Why the Android App (companion) is just a simple webview?

Home Assistant Companion App seems to be just an html render of the web Lovelace UI and a few device sensors. It is slow to open and it usually reloads when reopen. Far far away from a native app.

I usually have to install HA Client (third dev) on my family members devices to give them a really good user experience.

However, it’s better than nothing, and I appreciate it exists.

What are you looking for?

Keep in mind HA client has to build the UI for each and every component and I don’t think it works with custom cards. Having a webview means that the android app does not need to worry about the UI as the HA frontend maintains it. What devices are you seeing it running slow on? Did you update to version 2.2.1 that was just released?

I feel like the web view is preferable for the vast majority of users, since it reflects your Lovelace UI customizations and will always be up to date with new Home Assistant versions.

All of the things surrounding it like push notifications and sensors are the native part.

4 Likes

I understand the use of web view which is far more maintainable. But I just tried the native HA client android app and the speed difference in navigation is amazing. I think I’ll create a Lovelace dashboard just for the app without any custom cards, just for the performance benefits.

what debice are you using? I don’t have any issues with the speed of navigatiom or anything.

I bet the issue is your custom cards, I have no lag issues on my pixel 4 xl and I don’t use any custom cards. Check that they are all up to date as well. The app should be as fast as Chrome.

I’m using a OnePlus 8 Pro so the device speed is not the issue. The navigation is not super slow but the difference is noticeable for sure. I could try using it without any custom cards. But I still expect a native app to be faster…

Yes, I am using the latest version of the the app (testing the new dark mode). I have the first tabs of my Lovelace having only standard components (mostly switches, lights, sensors and scenes), and I only have a last tab with some custom mini graph cards.

It is true that my device is 2 years old, but I am talking of a few seconds with the loading logo and then a possible reload of the web view if it has been a while since I used it.

When you use the phone with HA as a TV remote, or to quickly turn on a light, or to open a door, this waiting time is the difference between a great user experience and a normal one.

However, I understand the technical reasons. I will keep both apps (HA Companion for graphs and config and HA client for regular use) for now.

PS: I have a lot of widgets added and they are extremely useful. They are just immediate. I am just expecting some more icons and the edit possibility in the future.

1 Like

That does not sound normal to me. I have a relatively heavy dashboard with lots of custom cards etc. and I just tried it with a Galaxy S9 and there were no issues at all, fast and snappy.

The same - if your mobile device is 2 years old or older and have some custom cards you are going to compromise:
Or you put up with lagging of interface.
Or you refuse to use custom cards.
Or you are going to buy new device.

But, maybe we need to have handy benchmark tool to consider the possibility of using this or that custom card?

it’s not only the phone that plays a role here, the hardware you are running HA on will largely affect the performance on the phone as well.

And it won’t be more efficient to use PWA instead of the webview?
I’m not an expert, but found these links:


Native apps get more permissions, like background location and wifi connection.

Yeah, I mean a PWA inside the native app, as it is the webview right now. I think that with the PWA, all resources are cached on the device.

Hello,

Do not forget about Ariela - Home Assistant Android Client