uadetector icon indicating copy to clipboard operation
uadetector copied to clipboard

UADetector detects some android tablets as smartphone

Open avtarv opened this issue 11 years ago • 1 comments

I am using core - 0.9.22 and resources - 2014.10 to detect device type - smartphone or tablet:

I am running into this problem where android 'tablet' is getting detected as 'smartphone'.

Code:

UserAgentStringParser parser = UADetectorServiceFactory.getResourceModuleParser();

ReadableUserAgent agent = parser.parse("Mozilla/5.0 (Linux; Android 4.3; en-gb; SAMSUNG SM-P600 Build/JSS15J) AppleWebKit/537.36 (KHTML, like Gecko) Version/1.5 Chrome/28.0.1500.94 Safari/537.36"); // user agent for Samsung Galaxy Note 10.1

System.out.println("Category name: " + agent.getDeviceCategory().getName());

Output: Category name: Smartphone

Does anyone know why is Galaxy note 10.1 getting detected as smartphone instead of tablet?

avtarv avatar Nov 24 '14 08:11 avtarv

Because of the used patterns to recognize the device category. The underlying database will not be maintained by me. You can go to http://user-agent-string.info to get improvements.

arouel avatar Nov 24 '14 22:11 arouel