Skip to content

Commit c8ece08

Browse files
committed
Improve device detection: Google Pixel Watch
1 parent 4ddbeea commit c8ece08

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

src/main/ua-parser.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -782,7 +782,8 @@
782782

783783
/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i // Samsung Galaxy Watch
784784
], [MODEL, [VENDOR, SAMSUNG], [TYPE, WEARABLE]], [
785-
/((pebble))app/i // Pebble
785+
/((pebble))app/i, // Pebble
786+
/(google) (pixel watch[\w ]*)( bui|\))/i // Pixel Watch
786787
], [VENDOR, MODEL, [TYPE, WEARABLE]], [
787788
/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i // Apple Watch
788789
], [MODEL, [VENDOR, APPLE], [TYPE, WEARABLE]], [

test/specs/device-all.json

+18
Original file line numberDiff line numberDiff line change
@@ -4769,6 +4769,24 @@
47694769
"type": "tablet"
47704770
}
47714771
},
4772+
{
4773+
"desc": "Google Pixel Watch",
4774+
"ua": "Dalvik/2.1.0 (Linux; U; Android 13; Google Pixel Watch Build/TWD4.231005.002)",
4775+
"expect": {
4776+
"vendor": "Google",
4777+
"model": "Pixel Watch",
4778+
"type": "wearable"
4779+
}
4780+
},
4781+
{
4782+
"desc": "Google Pixel Watch 2",
4783+
"ua": "Dalvik/2.1.0 (Linux; U; Android 13; Google Pixel Watch 2 Build/TWD9.240605.001.A1)",
4784+
"expect": {
4785+
"vendor": "Google",
4786+
"model": "Pixel Watch 2",
4787+
"type": "wearable"
4788+
}
4789+
},
47724790
{
47734791
"desc": "Google Pixel XL",
47744792
"ua": "Mozilla/5.0 (Linux; Android 7.1; Pixel XL Build/NDE63X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.85 Mobile Safari/537.36",

0 commit comments

Comments
 (0)