Individuals will quickly want to mark this question as a duplicate, but, please read this question first.
I have a PWA. A user can successfully install this app from my website. However, they may visit the website again from their browser. If they do this, Chrome shows a "choose app" icon in place of the "install" icon in the address bar. My question is, can I programmatically detect if the app has been installed?
The common recommendation is to use window.matchMedia('(display-mode: standalone)').matches
. However, in the scenario above, the display-mode
will be "tab" (i.e. not 'standalone'). I would like to detect if the app is installed in my page and "open" the app just like Chrome does. Is this possible?