PWA is giving me a hard time !
A module determines if my game run on Android and displays a prompt with a button to add the game on home screen.
It works perfectly on Chrome but have very different results with other browsers :
- doesn't work on Samsung Browser, install doesn't trigger
- Installs with Firefox a version of the game very difficult to quit (? very strange yes)
- may have inconstitancies with other browsers.
So, in addition to finding out that the game runs on Android, I'm looking for a way to determine the navigator.
I've tried with parsing the Useragent file from the Browser plugin, looking for the "Chrome" part but it appears that, for exemple, "Chrome" part also appears with Samsung browser...
I did find here a list (a year old, though) of common user agent strings : https://deviceatlas.com/blog/mobile-browser-user-agent-strings
I guess something can be made out of this to achieve a sort of accurate detection system, maybe involving regex, but I don't know how to do it.
Any idea ?
Also