From 83ca52bb28b0418c67476a53eafa3a840489f3b9 Mon Sep 17 00:00:00 2001 From: Nikhil Motiani Date: Thu, 16 Mar 2017 19:43:50 +0530 Subject: [PATCH] Added Voice Xtreme Phones detection --- src/ua-parser.js | 3 +++ test/device-test.json | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/src/ua-parser.js b/src/ua-parser.js index fcdc91f..97f53a7 100644 --- a/src/ua-parser.js +++ b/src/ua-parser.js @@ -673,6 +673,9 @@ /android.+[;\/]\s*(NS-?.+)\s+build/i // Insignia Tablets ], [MODEL, [VENDOR, 'Insignia'], [TYPE, TABLET]], [ + /android.+[;\/]\s*(Xtreme\_?)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i + ], [[VENDOR, 'Voice'], MODEL, [TYPE, MOBILE]], [ // Voice Xtreme Phones + /\s(tablet)[;\/]/i, // Unidentifiable Tablet /\s(mobile)(?:[;\/]|\ssafari)/i // Unidentifiable Mobile ], [[TYPE, util.lowerize], VENDOR, MODEL], [ diff --git a/test/device-test.json b/test/device-test.json index bc0414f..bacaa1b 100644 --- a/test/device-test.json +++ b/test/device-test.json @@ -732,4 +732,15 @@ "type" : "tablet" } } +, + { + "desc" : "Voice Xtreme V75", + "ua" : "Mozilla/5.0 (Linux; U; Android 4.2.1; en-us; V75 Build/JOP40D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30", + "expect" : + { + "vendor" : "Voice", + "model" : "V75", + "type" : "mobile" + } + } ]