uap-core icon indicating copy to clipboard operation
uap-core copied to clipboard

Incorrect Android app detection

Open hwo411 opened this issue 6 years ago • 2 comments

We want to use https://www.npmjs.com/package/react-native-user-agent in our app and use this gem to detect the UA, however we discovered that Android application name is not properly detected.

From Ruby version:

UserAgentParser.parse 'application-name/1.6.7.42 Dalvik/2.1.0 (Linux; U; Android 5.1.1; Android SDK built for x86 Build/LMY48X)'
=> #<UserAgentParser::UserAgent Android 5.1.1 (Android 5.1.1) (Android SDK built for x86)>

but should be #<UserAgentParser::UserAgent application-name 1.6.7.42 (Android 5.1.1) (Android SDK built for x86)>

On iOS however everything works properly:

UserAgentParser.parse 'application-name/1.6.4.176 CFNetwork/897.15 Darwin/17.5.0 (iPhone/6s iOS/11.3)'
=> #<UserAgentParser::UserAgent application-name 1.6.4.176 (iOS 11.3) (iPhone)>

Could you fix this please?

hwo411 avatar May 01 '19 09:05 hwo411

com.zhihu.android.lite/Futureve/1.1.1 Mozilla/5.0 (Linux; Android 8.1.0; vivo Y71A Build/OPM1.171019.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/62.0.3202.84 Mobile Safari/537.36

how to detect com.zhihu.android.lite/Futureve/1.1.1

smileboywtu avatar Jun 20 '19 03:06 smileboywtu

@hwo411 Thank you for opening this issue! I would also expect application-name/1.6.7.42 Android/5.1.1 to be detected.

vladimirlogachev avatar Oct 22 '22 23:10 vladimirlogachev