useragent

The libary of useragent parser, using to parse infomation of browser,os,device and net version and so on. This version of parser contains much of special useragent of chinese feature.

License

License

GroupId

GroupId

com.github.denisdou
ArtifactId

ArtifactId

useragent
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

pom.sha512
Description

Description

useragent
The libary of useragent parser, using to parse infomation of browser,os,device and net version and so on. This version of parser contains much of special useragent of chinese feature.
Project URL

Project URL

https://github.com/denisdou/userAgent
Source Code Management

Source Code Management

https://github.com/denisdou/userAgent

Download useragent

Dependencies

compile (2)

Group / Artifact Type Version
org.yaml : snakeyaml jar 1.27
org.apache.commons : commons-lang3 jar 3.11

Project Modules

There are no modules declared in this project.

userAgent


The library of user agent parser, using to parse information of browser,os,device and net version and so on. This version of parser contains much of special useragent of chinese feature.

Examples


String userAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36";
UserAgentParser userAgentParser = new UserAgentParser();
UserAgent userAgent = userAgentParser.parse(userAgent);

//browser 
System.out.print(userAgent.browser.vendor);
System.out.print(userAgent.browser.family);
System.out.print(userAgent.browser.major);
System.out.print(userAgent.browser.minor);

//browser engine
System.out.print(userAgent.browser.engine.family);
System.out.print(userAgent.browser.engine.version);

//device
System.out.print(userAgent.device.vendor);
System.out.print(userAgent.device.family);
System.out.print(userAgent.device.deviceType);

//os
System.out.print(userAgent.os.vendor);
System.out.print(userAgent.os.family);
System.out.print(userAgent.os.major);
System.out.print(userAgent.os.minor);
System.out.print(userAgent.os.platform);

//net type
System.out.print(userAgent.netType);

//check mobile
System.out.print(userAgent.isMobile);

//check TV
System.out.print(userAgent.isTv);

support


  • Common Browsers
  • Common Mobile Devices
  • Net type 2G/3G/4G/5G/Wifi
  • Device type PC/Phone/Pad/TV
  • Equipment unique identification
  • Device platform ARM/X64/X86/

License


Apache License 2

Versions

Version
1.0.0