Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PWA without status bar #1

Open
jayb-g opened this issue Sep 22, 2023 · 5 comments
Open

PWA without status bar #1

jayb-g opened this issue Sep 22, 2023 · 5 comments

Comments

@jayb-g
Copy link

jayb-g commented Sep 22, 2023

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
Copy link
Author

jayb-g commented Sep 22, 2023

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
Copy link
Author

jayb-g commented Nov 3, 2023

@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
Copy link
Owner

derlin commented Nov 8, 2023

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
Copy link
Author

jayb-g commented Nov 25, 2023

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
Copy link
Author

jayb-g commented Nov 25, 2023

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants