Android "add to home screen" bug with ssl

Just for those still looking to resolve this. I found a super simple method. just turn your phone on Airplane mode, reload the page and than add it while it’s trying to load. it worked for me.

Than of course turn of airplane and the shortcut loads with no issues :slight_smile:

11 Likes

Surprisingly the airplane mode workaround worked for me as well. There is only one caveat: At least in my case the shortcut isn’t created with the home assistant icon but with a generic “first letter of the domain” icon that chrome uses if it can’t load the favicon from the server (obviously because it’s in airplane mode).

If you use a more fancy launcher in android you may be able to change the icon after the shortcut was created by editing the properties of the shortcut.

Here’s a workaround for Nova Launcher users:

Make sure, you still have a shortcut with a proper HA icon in the app list. Apparently the “buggy” shortcut you crated before, that opens a chrome tab instead of the kiosk mode web app works fine.

Create the proper shortcut in airplane mode (see last post by @calberttj). Long tap the new shortcut, choose “Edit” and tap on the icon. Then choose Built-In from the list and select the HA icon from the old shortcut.

After that you may delete and uninstall the old web app. This doesn’t affect the newly created shortcut.

I just tried this on Android 8 and it worked to create the kiosk view but I cant change the icon. The only options I get from a long press are ‘select items’ and ‘remove from home’. That snot the end of the world though, i’m far happier than it opening a chrome tab every time.

As said, changing app icons is a feature, which isn’t offered by most standard Android launchers. The workaround above is for Nova Launcher users only.

If you don’t want to switch to another launcher, there are some apps on the store, which allow to change app icons. Most of them loaded with ads though. But nevertheless they should work as well.

ah, thanks. I should have read the post properly! :roll_eyes:

Note that the actual solution seems to be having Home Assistant on port 443. Either by port forwarding it directly to that or by reverse proxy. (That’s what I have done at least, and it works fine.)

I think the issue lies with Android, not Home Assistant.

Hasn’t been an issue for ages, at least not if you’re on an up to date version of Oreo. Yes, it was an Android/Chrome issue and no, you don’t need to use 443.

my phone only got the Oreo update on Monday.

1 Like

Very graceful solution =) Thanks, worked for me.
By the way, have a latest Oreo as well.

Wow it worked! Thanks a lot!

I for the life of me cannot get this to work. Switching to airplane mode, reload the page, hit More, but can never get the Add to Home Screen option to show. Not sure what i’m missing here.

same for me. Never had this problem before started few days ago, not sure why

I see that you already selected an “answer” but to me the solution sounds too complicated, I solved this myself by NOT clicking on the Home assistant prompt, but instead go to the selected page you want, for example “url/lovelace/home” and then click on the settings button in your browser (i use Chrome) and make a shortcut to homescreen from there, this way it worked for me.

Kind regards,

Thanks, but nope that still didn’t work. Interesting though is my phone is an LG G5 running Oreo with Chrome .69, and it doesn’t work. Just tried it on a Galaxy S7 (not mine) on Oreo and Chrome .69 and it works (using the airplane mode). Not sure what restrictions the phone manufacturer is adding to prevent this.

so you need to activate airplane mode each time you use the shortcut? or just once when you create the shortcut?

I managed to create shortcuts on Huawei, Samsung, Iphone, Ipad, WindowsPC, Mac, and a super cheap android tablet which I dont know the name of, none of them complained when using my method explained above.

Just once when you create the shortcut.

What people seem not to know is, since Oreo, if you make a shortcut in Chrome of an SSL site, without turning Airplane mode on, it adds it as an app to your app folder. Have a look in there, you may be surprised!

That was it. Awesome. Thanks for the tip.

If you are using Lovelace I found you also need to be on the Lovelace URL when you do it, or when you open it up it wont be on Lovelace each time and you’ll need to manually navigate over to it (setting it as default does not work).

Old topic, still a current issue. Resolved for me by going to https://www.*:8123. Since I own the domain and have a valid cert, it’s a valid URL.

Then it added just fine to my Action Launcher desktop on my Pixel 3 XL.

I set everything up and connected with https one time then I closed the page on my phone and removed the https from the configuration file and restarted.

When you enter the site again on the phone an error message is displayed and you can add it to the home screen with custom tab.

Then you need to add https to the configuration again to get it to work again.