Open Azmeer02 opened 11 months ago
This doesn't seem to be a bug.
If you want to know if the app is installed, you can put a query string on the start-url in your manifest:
"start_url": "/?installed",
In one of my apps, I have installed instances go to a /start
route that checks local storage and does some config before the app starts, then does a router.replace()
to the correct main page.
Once either of these criteria have been met, you can stash something on the device to make it easier to identify if the app is installed or not using local storage or indexedDB.
If you are trying to find out is when the user opens your web-app, it to show varying info based if it's opened in PWA mode or not, try this
const isPWA = window.matchMedia("(display-mode: standalone)").matches || (navigator as any).standalone;
let me know if this makes sense or you found a better way
Issue Description:
I'm using next-pwa for my Next.js project, and I have successfully converted my application into a Progressive Web App (PWA). However, I'm facing a challenge in identifying whether the PWA is installed or not on both iOS and Android devices to improve the user experience.
Steps to Reproduce:
Expected Behavior:
I expect to find a way to determine whether the PWA is installed on the user's device, so I can provide an enhanced user experience, such as displaying a custom install banner or enabling additional features for installed users.
Current Behavior:
As of now, I have not found a suitable method or library within the next-pwa documentation or examples to identify the application installation status in both iOS and Android devices.
Any guidance or pointers on how to identify the installation status of a PWA in both iOS and Android using next-pwa would be greatly appreciated.