-1

I was wondering if it was possible to see what device users are operating the App from either through angular or Javascript. I am guessing there would be 3 states? Android, iOS, and PWA?

2 Answers2

0

Yes, it is entirely possible to use browser detection logic with JavaScript. Based on the browser you can determine which OS is being used. (Safari for iOS and Chrome for Android.)

See this StackOverflow posting covers one way to accomplish this.

If you wish to detect if it's a PWA on iOS, see this link.

attila226
  • 214
  • 1
  • 12
  • I understand that you can check the browser, but on iOS, there is the possibility of being in App or being in Safari. I am trying to determine whether the user is operating from the PWA or the app from the app store. – Alexander Case Nov 26 '18 at 18:18
0

This is the function that will tell you what platform the user is using.

                buildfire.getContext(function (err, result) {
                    if(result){
                        console.log(result);
                    }
                });