I am developing a PWA for which I want to have "add to home screen" (a2hs) functionality in standalone display mode.
During development, my PWA is running on a server which is accessible from within my local network only (not from outer internet).
When testing a2hs on Chrome for Android, I encounter the following strange behavior.
Simple add to home screen When my PWA is added to the home screen as a normal shortcut, then everything works fine. Clicking on the shortcut will open the PWA in standalone display mode (without Chrome UI visible).
Advanced add to home screen (WebAPK) When the PWA is added to the home screen as a WebAPK shortcut, then the standalone flag in my web manifest is ignored. Clicking on the shortcut will open the PWA within a browser tab (with Chrome UI visible).
What could be the reason of this incorrect behavior? My guess is that Google's servers need to be able to access my PWA's manifest in order to properly assemble the WebAPK. Since my manifest is not accessible from internet, the WebAPK is not correctly assembled. This is just guessing though. Can someone confirm or describe the reason for this strange behavior?
You PWA can be in complete private network(we have one) and still work as a installable (WebAPK) PWA. Only reason you would be seeing the Chrome UI is, one of the PWA criteria is not met. Run lighthouse report and make sure everything under PWA is passed. Post your audit report if you need help with it.
If you are using a custom port, try using the default port.
Others have reported the same odd behaviour.
This issue was fixed by using the default port.
PWA deployed in node.js running in Standalone mode on Android and iOS