Skip to content

Commit

Permalink
Detect new brands: CPDEVICE, Korax, XPPen and Detect devices for exis…
Browse files Browse the repository at this point in the history
…t brands (#7855)

* feat(device) detect brand Google: Pixel 4a (5G) (G025E)
feat(device) detect brand OPPO: A3 5G (CPH2693)

* feat(device) detect new brand CPDEVICE: Apollo 10 Pro
feat(device) detect brand OPPO: K12x 5G (CPH2667), A3x (CPH2641)
feat(device) detect brand OnePlus: Nord 4 (CPH2661, CPH2663)
feat(device) detect brand MobiWire: Smart P24
feat(device) detect brand Vivo: V17 Neo (1907_19)
feat(device) detect brand Casper: VIA L40
feat(device) detect brand Huawei: MatePad SE 11 WiFi (AGS6-W09), MatePad SE 11 (AGS6-L09), MatePad T10s (AGS3-AL09)

* feat(device) detect brand Pico: A8110
ref #7854

* feat(device) detect brand Xiaomi: Redmi Note 8 (2021) (biloba)
feat(device) detect brand Blu: View 5 (B160V)
feat(device) detect brand iHunt: Titan P10000 Pro
feat(device) detect brand iTel: Vision 2

* feat(device) detect new brand XPPen: Magic Drawing Pad
feat(device) detect new brand Korax: Eurobox
feat(device) detect brand Xiaomi: Redmi Note 7 (M1901F7G), Redmi 7A (M1903C3EG)
feat(device) detect brand Vivo: Y85A, Y85, Y83A, Y71, Y71A
feat(device) detect brand Maze Speed: M1582C Max
feat(device) detect brand Dragon Touch: Y88X Plus
feat(device) detect brand Vorcom: Quartz Pro
feat(device) detect brand Lenovo: Vibe K5 (A6020l37), Vibe K5 Plus (A6020a46)
feat(device) detect brand Huawei: Nova 5T (Yale-L71A, Yale-L61D), Honor Play 3, Honor 9X Pro, Honor 9X, Honor 8S, Honor 8A, Honor 20, Honor 10I

* feat(client) remove default engine from Wolvic browser
feat(client) added multy browser family for Wolvic browser
  • Loading branch information
sanchezzzhak authored Oct 3, 2024
1 parent 4af7425 commit c6cb44b
Show file tree
Hide file tree
Showing 10 changed files with 866 additions and 38 deletions.
10 changes: 9 additions & 1 deletion Parser/Client/Browser.php
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,7 @@ class Browser extends AbstractClientParser
'FB', 'FE', 'AX', 'FM', 'FR', 'FY', 'GZ', 'I4', 'IF',
'IW', 'LH', 'LY', 'MB', 'MN', 'MO', 'MY', 'OA', 'OS',
'PI', 'PX', 'QA', 'S5', 'SX', 'TF', 'TO', 'WF', 'ZV',
'FP', 'AD', 'WL', '2I', 'P9', 'KJ', 'WY', 'VK', 'W5',
'FP', 'AD', '2I', 'P9', 'KJ', 'WY', 'VK', 'W5',
'7C', 'N7', 'W7', '8P',
],
'Internet Explorer' => ['IE', 'CZ', 'BZ', 'IM', 'PS', '3A', '4A', 'RN'],
Expand Down Expand Up @@ -1097,6 +1097,14 @@ public function parse(): ?array
$engineVersion = '';
}

if ('Wolvic' === $name && 'Blink' === $engine) {
$family = 'Chrome';
}

if ('Wolvic' === $name && 'Gecko' === $engine) {
$family = 'Firefox';
}

return [
'type' => 'browser',
'name' => $name,
Expand Down
3 changes: 3 additions & 0 deletions Parser/Device/AbstractDeviceParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'G3' => 'CG Mobile',
'37' => 'CGV',
'CP' => 'Captiva',
'CPD' => 'CPDEVICE',
'CF' => 'Carrefour',
'CA1' => 'Carbon Mobile',
'CS' => 'Casio',
Expand Down Expand Up @@ -967,6 +968,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'KR' => 'Koridy',
'XK' => 'Koslam',
'K2' => 'KRONO',
'KRX' => 'Korax',
'KE' => 'Krüger&Matz',
'5K' => 'KREZ',
'WK' => 'KRIP',
Expand Down Expand Up @@ -1969,6 +1971,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'XN' => 'Xion',
'XO' => 'Xolo',
'XR' => 'Xoro',
'XPP' => 'XPPen',
'XRL' => 'XREAL',
'XS' => 'Xshitou',
'XSM' => 'Xsmart',
Expand Down
18 changes: 18 additions & 0 deletions Tests/fixtures/car_browser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1043,3 +1043,21 @@
model: CarPad
os_family: Android
browser_family: Unknown
-
user_agent: Mozilla/5.0 (Linux; Android 9; APOLLO10 PRO) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.96 Mobile Safari/537.36
os:
name: Android
version: "9"
platform: ""
client:
type: browser
name: Chrome Mobile
version: 78.0.3904.96
engine: Blink
engine_version: 78.0.3904.96
device:
type: car browser
brand: CPDEVICE
model: Apollo 10 Pro
os_family: Android
browser_family: Chrome
36 changes: 36 additions & 0 deletions Tests/fixtures/phablet-1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5508,3 +5508,39 @@
model: Honor Magic V3
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 14; biloba) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Mobile Safari/537.36
os:
name: Android
version: "14"
platform: ""
client:
type: browser
name: Chrome Mobile
version: 129.0.0.0
engine: Blink
engine_version: 129.0.0.0
device:
type: phablet
brand: Xiaomi
model: Redmi Note 8 (2021)
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 12; M1901F7G) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Mobile Safari/537.36
os:
name: Android
version: "12"
platform: ""
client:
type: browser
name: Chrome Mobile
version: 125.0.0.0
engine: Blink
engine_version: 125.0.0.0
device:
type: phablet
brand: Xiaomi
model: Redmi Note 7
os_family: Android
browser_family: Chrome
Loading

0 comments on commit c6cb44b

Please sign in to comment.