Discussion:
[chromium-discuss] WebAPK ignores display:standalone for PWA running on local network
Fatih Coşkun
2018-08-08 13:47:02 UTC
Permalink
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?
--
--
Chromium Discussion mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+***@chromium.org.
d***@chromium.org
2018-08-09 07:15:02 UTC
Permalink
You are correct: WebAPKs cannot be generated for URLs not accessible to the
wider internet.
Post by Fatih Coşkun
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?
--
--
Chromium Discussion mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+***@chromium.org.
Fatih Coşkun
2018-08-09 08:40:08 UTC
Permalink
Meanwhile I got it to work. I had posted the same question on stackoverflow
<https://stackoverflow.com/questions/51748668/webapk-ignores-displaystandalone-flag-for-pwa-running-on-local-network>
and was asked to try it with default ports. Indeed, with default ports, it
started working via WebAPK.
Post by d***@chromium.org
You are correct: WebAPKs cannot be generated for URLs not accessible to
the wider internet.

Thanks for the reply. However, my successful test shows now that this does
not seem to be the case. My PWA is installed as a WebAPK, although it is
not accessible from wider internet. It is however accessible by the Chrome
browser on my Android device (my wifi has access to my PWA server). It
seems to be sufficient.
--
--
Chromium Discussion mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+***@chromium.org.
Loading...