derlin / pwa-ize

Transform any web page into a PWA that can be launched in a dedicated/separate browser instance on Mobile
https://derlin.github.io/pwa-ize/
5 stars 1 forks source link

PWA without status bar #1

Open jayb-g opened 9 months ago

jayb-g commented 9 months ago

Most PWAs don't show status bar on top or bottom, whereas using PWA-izer, there is a status bar.

Even in your readme, the sample PWA has status bar on top.

Any way it can be without the status bar? I don't know if there is a standard for that. Maybe if service worker is generated?

Maybe these will help: https://github.com/NeverDecaf/discord-PWA https://stackoverflow.com/questions/68856575/android-os-nav-and-status-bars-toggling-in-and-out-on-fullscreen-pwa

jayb-g commented 9 months ago

I analyzed further and realized that using PWA-izer, start-url is of github.io and not the intended target.

that might be the cause of status bar being displayed.

Screenshot from 2023-09-22 13-19-30

jayb-g commented 8 months ago

@derlin I got it now. Can there be a workaround to make browser think that it actually got installed from the original site and not github site? So that the top bar is removed? Maybe using custom hosts file? Would it work ?

derlin commented 8 months ago

Hello @jayb-g and sorry for the late reply, Unfortunately, no, there is no way to bypass the redirect, as the start URL needs to match the manifest URL. And if there is a redirect, then there is necessarily a top bar... I know it sucks, but pwa-ize is already quite a hack!

This is at least the conclusion I came to, but I am happy to hear your ideas if you have any :)

jayb-g commented 7 months ago

I mean I don't think it can be incorporated here but what I'm suggesting is that if maybe you can change hosts file on your Android(possible only if its rooted) or through changing router settings:

  1. route foo.com to an IP you control and have it serve the same manifest. Would it work?

  2. I know there's an additional requirement for the site to be on SSL. Can that be handled too? By making your browser accept the certificate? The certificate can be revoked after installation of PWA so it doesn't conflict with the original certificate for the site.

^All to make browser think that the mainfest is actually coming from foo.com and not github.com/bar

I think if both of it can be managed then PWA would install fine without the top bar. Maybe its too much for some just to have a PWA for a site that doesn't support it.

jayb-g commented 7 months ago

@derlin Another workaround is if a react webview wrapper App(apk) can be generated dynamically based on user requested domain. The app name also can be dynamic(user provided). It would be installable like any normal app but wouldn't require whole lot of permissions to use it since it just uses webview.

At this point I'm not thinking about necessary permissions for some kind of sites such as location, but I think it would be enough even without permissions for most sites.

Added benefit to this apprpach: it doesn't remain attached to the browser session like in case of installed as PWA.