Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Differentiating from WebView mobile chrome and real Mobile Chrome #38

Closed
lstrojny opened this issue Apr 3, 2015 · 3 comments · Fixed by #255
Closed

Differentiating from WebView mobile chrome and real Mobile Chrome #38

lstrojny opened this issue Apr 3, 2015 · 3 comments · Fixed by #255

Comments

@lstrojny
Copy link
Contributor

lstrojny commented Apr 3, 2015

Original issue by @bwaters at ua-parser/uap-php#15:

Is there anyway for uap-php to tell the difference between WebView in an Android App and the Chrome Mobile browser. https://developer.chrome.com/multidevice/user-agent

Looks like if it has a Version/x.x then it is webview ie..

Mozilla/5.0 (Linux; Android 4.4.4; SAMSUNG-SM-G870A Build/KTU84P) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/33.0.0.0 Mobile Safari/537.36

Vs a real chrome ua like this one:

Mozilla/5.0 (Linux; Android 4.4.4; SAMSUNG-SM-G900A Build/KTU84P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.96 Mobile Safari/537.36

@patmmccann
Copy link

Here is some related user agents for the FB App; shouldn't we just call the app the Browser?

Mozilla/5.0 (iPad; CPU OS 8_4 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Mobile/12H143 [FBAN/FBIOS;FBAV/35.0.0.34.220;FBBV/12945441;FBDV/iPad2,5;FBMD/iPad;FBSN/iPhone OS;FBSV/8.4;FBSS/1; FBCR/;FBID/tablet;FBLC/en_US;FBOP/1]

Mozilla/5.0 (Linux; Android 4.4.2; SCH-R970 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/38.0.0.47.240;]

@shaharmor
Copy link
Contributor

Any chance to get this implemented?

According to this: https://developer.chrome.com/multidevice/user-agent#webview_user_agent
There is a difference in the UA, so we should be able to add it to this module so the browser will be shown as Chrome Mobile WebView when its a WebView and not the actual browser?

@meagerman
Copy link

Sorry to comment on such an old issue, but the issue reported by the OP was never addressed in the fix. The fix looks for "wv" in the user agent, but the OP reported a user agent that does not have this notation.

"wv" was only added in Lolipop. Prior to that, the "Version/x.x" is the correct marker to look for: https://developer.chrome.com/multidevice/user-agent#webview_user_agent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants