Reputation: 396
I want to write a java service that parses User Agent String
of requests from Mobile Devices
.
The information that I want extract is:
Operation Name
Operation Version
Device Type
Browser Name
Browser Version
I searched some lib for Java:
WURFL-Wireless Universal Resource FiLe
In that I have used UserAgentUtils
to parse user agent string from PC request.
But It not focus Mobile Devices
.
I also tried WURFL
, It's quit good.
Can you suggest me other Lib.
I want find a Lib that parse user agent string focus Mobile Devices
.
Thanks alot!
Upvotes: 2
Views: 1780
Reputation: 595
I'm working for some time on an user agent parser library (called UADetector) based upon the database of user-agent-string.info. For now it is only possible to distinguish Mobile browsers rather than Mobile Devices. But we can extend this library to be able to scan different signatures.
To develop a more convenient access, we can build a Signature-Enum right into the class UserAgent
as a set, like this:
Set<Signature> getSignatures();
and we can also add some Is-Methods:
boolean isNexus();
boolean isIPhone();
boolean isIPad();
etc.
But for this step, i need currently some input/support by you (and/or other developers) to collect mobile device signatures (in user agent strings).
Upvotes: 2