In my project I am developing a PWA with a manifest "display" flag set to "standalone". During development this PWA is running on a server which is accessible on my local network only (not from outer internet).
During testing a2hs functionality in latest Android Chrome browser, I encountered the following strange behavior.
Add to Home Screen via simple Shortcut
When the PWA is added to the home screen as a simple shortcut , then everything seems to work fine. Clicking on the home screen shortcut will open the PWA in standalone mode without visible Chrome UI.
Add to Home Screen via WebAPK installation
When the the PWA is installed as a WebAPK, then the standalone flag seems to be ignored. When tapping on the home screen shortcut, the PWA will open in Chrome browser with visible Chrome UI.
In both cases I will trigger a2hs via Chrome browser's options menu item "Add to Home Screen". For testing the first case, the web manifest needs to be incomplete. It is sufficient to remove icons from the manifest. Otherwise the manifest is the same in both test cases. Depending on whether the manifest includes icons or not, the PWA will be added as a simple shortcut or WebAPK.
Why does the standalone flag not work in the second test case? A possible reason could be that my PWA is not accessible from outer internet, and hence Chrome servers cannot properly assemble the WebAPK. However this is just guessing on my part. Can someone confirm this reason?