serbanghita / Mobile-Detect

Mobile_Detect is a lightweight PHP class for detecting mobile devices (including tablets). It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.

Home Page:http://mobiledetect.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bad detection for recent Xiaomi browser

benland2 opened this issue · comments

The following user agent of Xiaomi mobile is detected as PC:

Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/89.0.4389.116 Safari/534.24 XiaoMi/MiuiBrowser/12.13.2-gn

@benland2 problem here is that besides XiaoMi/MiuiBrowser/12.13.2-gn part, there is no indication of what type of device this is. Is this the browser https://play.google.com/store/apps/details?id=com.mi.globalbrowser&hl=en&gl=US ?
If this is only on mobile devices then I can add it to the list of mobile browsers

@serbanghita @benland2
The mentioned UA string is from Desktop Mode of the Xiaomi Browser.
Running in normal mode (default after installation on my mobile phone) will detect isMobile() = true and isXiaomi() = true.

The normal (default configuration of the browser) is fully covered by current versions of MobileDetect.

OK it means that my related user has enabled the Desktop Mode on his browser. Thank you for your investigation.