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

Add regex for Xiaomi MIX, MIX 2 and MIX 2S. And regex for Samsung device with chrome #406

Merged
merged 2 commits into from
Jun 10, 2019

Conversation

penghui
Copy link
Contributor

@penghui penghui commented Apr 26, 2019

UA sample for Xiaomi MIX 2S, MIX and MIX 2:
Mozilla/5.0 (Linux; U; Android 9; MIX 2S Build/PKQ1.180729.001) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/61.0.3163.128 Mobile Safari/537.36 XiaoMi/MiuiBrowser/10.7.3
Mozilla/5.0 (Linux; U; Android 8.0.0; zh-cn; MIX Build/OPR1.170623.032) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/61.0.3163.128 Mobile Safari/537.36 XiaoMi/MiuiBrowser/10.1.1
Mozilla/5.0 (Linux; U; Android 8.0.0; zh-cn; MIX 2 Build/OPR1.170623.027) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/61.0.3163.128 Mobile Safari/537.36 XiaoMi/MiuiBrowser/10.1.1

Previously, these UAs are parsed as "Generic Smartphone". And now they are parsed correctly as Xiaomi MIX.

Source:
http://www.fynas.com/ua/search?d=&b=MIUI%E6%B5%8F%E8%A7%88%E5%99%A8&k=MIX&page=1

native browser in Samsung device is always ok.
Mozilla/5.0 (Linux; Android 8.0.0; SAMSUNG SM-G9500 Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/9.3 Chrome/67.0.3396.87 Mobile Safari/537.36

But chrome browser was parsed to Generic SmartPhone, here's the UA:
Mozilla/5.0 (Linux; Android 8.0.0; SM-G9500) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Mobile Safari/537.36
@penghui
Copy link
Contributor Author

penghui commented May 16, 2019

Add regex for chrome browser in Samsung Android phones

@penghui penghui changed the title Add regex for Xiaomi MIX, MIX 2 and MIX 2S. Add regex for Xiaomi MIX, MIX 2 and MIX 2S. And regex for Samsung device with chrome May 16, 2019
@commenthol commenthol merged commit 8b004ba into ua-parser:master Jun 10, 2019
@commenthol
Copy link
Contributor

Thanks

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 this pull request may close these issues.

2 participants