faisalman / ua-parser-js

"Unmask Your Traffic" - UAParser.js: The Essential Web Development Tool for User-Agent Detection
https://uaparser.dev/
GNU Affero General Public License v3.0
9.28k stars 1.19k forks source link

Detect PWA #728

Closed jlarmstrongiv closed 5 months ago

jlarmstrongiv commented 6 months ago

Is your feature request related to a problem? Please describe. I would like to be able to detect if users have installed my app as a PWA, and when they switch from a PWA back to the browser or vice-versa. A PWA enables more features like notifications that are important for my app processing, and I would only like to enable this feature when the app is installed as a PWA, not in a plain browser tab.

Describe the solution you'd like Use media queries to detect whether the website is used as a PWA and listen to events for when it changes.

Describe alternatives you've considered Doing it myself. I think the UA parser is a better place to have all the browser detection functionality in one place.

Additional context I support you with both business and enterprise licenses