PWA Detector
-
Hi, I would like to ask you if there is any way to intercept if the user is browsing in pwa mode. I did some research online and found these solutions: window.addEventListener('DOMContentLoaded', () => { let displayMode = 'browser tab'; if (window.matchMedia('(display-mode: standalone)').matches) { displayMode = 'standalone'; } // Log launch display mode to analytics console.log('DISPLAY_MODE_LAUNCH:', displayMode); }); or this: window.addEventListener('appinstalled', () => { // If visible, hide the install promotion hideInAppInstallPromotion(); // Log install to analytics console.log('INSTALL: Success'); }); But none of the above solutions work. Without going into too much detail about the goal I'm trying to achieve, I'll try to simplify it like this. If the user is viewing the site in PWA mode echo "YOU ARE ON PWA" There is a way to achieve this goal. I've read all your documentation but haven't found anything about it. Thank you for your attention and time dedicated.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘PWA Detector’ is closed to new replies.