Add generic device detection for samsung smartphones

This commit is contained in:
Benjamin Urban 2016-03-22 15:08:11 +01:00
parent 3a457f9bd9
commit 1020d10a30
2 changed files with 52 additions and 1 deletions

View File

@ -560,7 +560,7 @@
/android.+((sch-i[89]0\d|shw-m380s|gt-p\d{4}|gt-n8000|sgh-t8[56]9|nexus 10))/i, /android.+((sch-i[89]0\d|shw-m380s|gt-p\d{4}|gt-n8000|sgh-t8[56]9|nexus 10))/i,
/((SM-T\w+))/i /((SM-T\w+))/i
], [[VENDOR, 'Samsung'], MODEL, [TYPE, TABLET]], [ // Samsung ], [[VENDOR, 'Samsung'], MODEL, [TYPE, TABLET]], [ // Samsung
/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-n900))/i, /((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,
/(sam[sung]*)[\s-]*(\w+-?[\w-]*)*/i, /(sam[sung]*)[\s-]*(\w+-?[\w-]*)*/i,
/sec-((sgh\w+))/i /sec-((sgh\w+))/i
], [[VENDOR, 'Samsung'], MODEL, [TYPE, MOBILE]], [ ], [[VENDOR, 'Samsung'], MODEL, [TYPE, MOBILE]], [

View File

@ -268,5 +268,56 @@
"model" : "Galaxy Nexus", "model" : "Galaxy Nexus",
"type" : "mobile" "type" : "mobile"
} }
},
{
"desc" : "Samsung Galaxy S5",
"ua" : "Mozilla/5.0 (Linux; Android 5.0; SM-G900F Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.78 Mobile Safari/537.36",
"expect" :
{
"vendor" : "Samsung",
"model" : "SM-G900F",
"type" : "mobile"
}
},
{
"desc" : "Samsung Galaxy S6",
"ua" : "Mozilla/5.0 (Linux; Android 4.4.2; SM-G920I Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.135 Safari/537.36",
"expect" :
{
"vendor" : "Samsung",
"model" : "SM-G920I",
"type" : "mobile"
}
},
{
"desc" : "Samsung Galaxy S6 Edge",
"ua" : "Mozilla/5.0 (Linux; Android 4.4.2; SM-G925I Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.135 Safari/537.36",
"expect" :
{
"vendor" : "Samsung",
"model" : "SM-G925I",
"type" : "mobile"
}
},
{
"desc" : "Samsung Galaxy Note 5 Chrome",
"ua" : "Mozilla/5.0 (Linux; Android 5.1.1; SM-N920C Build/LMY47X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.91 Mobile Safari/537.36",
"expect" :
{
"vendor" : "Samsung",
"model" : "SM-N920C",
"type" : "mobile"
}
}
,
{
"desc" : "Samsung Galaxy Note 5 Samsung Browser",
"ua" : "Mozilla/5.0 (Linux; Android 5.1.1; SAMSUNG SM-N920C Build/LMY47X) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/4.0 Chrome/44.0.2403.133 Mobile Safari/537.36",
"expect" :
{
"vendor" : "Samsung",
"model" : "SM-N920C",
"type" : "mobile"
}
} }
] ]