java port of https://github.com/matomo-org/device-detector
- download this project
- get the latest regexes from https://github.com/matomo-org/device-detector/tree/master/regexes
- run it
DeviceDetector d = new DeviceDetector();
CompositeDetectResult ret = d.parse(ua);
if(ret!=null) {
System.out.println(ret);
}
- By default, DeviceDetector will detect bot, os, client and device
- You can create your own DeviceDetector to customize the parsers and detect logic
- java8
work in progress
- Cache regex objects
- Pre-match, tests the useragent against a combination of all regexes