Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added Huawei (phone, OS - HarmonyOS, browser) detection #952

Open
wants to merge 1 commit into
base: 4.8.x
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/MobileDetect.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
* @method bool isINQ()
* @method bool isOnePlus()
* @method bool isGenericPhone()
* @method bool isHuawei()
* @method bool isiPad()
* @method bool isNexusTablet()
* @method bool isGoogleTablet()
Expand Down Expand Up @@ -197,6 +198,7 @@
* @method bool iswebOS()
* @method bool isbadaOS()
* @method bool isBREWOS()
* @method bool isHarmonyOS()
* @method bool isChrome()
* @method bool isDolfin()
* @method bool isOpera()
Expand All @@ -218,6 +220,7 @@
* @method bool isNetFront()
* @method bool isGenericBrowser()
* @method bool isPaleMoon()
* @method bool isHuaweiBrowser()
* @method bool isWebKit()
* @method bool isConsole()
* @method bool isWatch()
Expand Down Expand Up @@ -467,6 +470,7 @@ class MobileDetect
'OnePlus' => 'ONEPLUS',
// @Tapatalk is a mobile app; http://support.tapatalk.com/threads/smf-2-0-2-os-and-browser-detection-plugin-and-tapatalk.15565/#post-79039
'GenericPhone' => 'Tapatalk|PDA;|SAGEM|\bmmp\b|pocket|\bpsp\b|symbian|Smartphone|smartfon|treo|up.browser|up.link|vodafone|\bwap\b|nokia|Series40|Series60|S60|SonyEricsson|N900|MAUI.*WAP.*Browser',
'Huawei' => 'HMSCore',
];

/**
Expand Down Expand Up @@ -873,6 +877,7 @@ class MobileDetect
'webOS' => 'webOS|hpwOS',
'badaOS' => '\bBada\b',
'BREWOS' => 'BREW',
'HarmonyOS' => 'HarmonyOS',
];

/**
Expand Down Expand Up @@ -923,6 +928,7 @@ class MobileDetect
'GenericBrowser' => 'NokiaBrowser|OviBrowser|OneBrowser|TwonkyBeamBrowser|SEMC.*Browser|FlyFlow|Minimo|NetFront|Novarra-Vision|MQQBrowser|MicroMessenger',
// @reference: https://en.wikipedia.org/wiki/Pale_Moon_(web_browser)
'PaleMoon' => 'Android.*PaleMoon|Mobile.*PaleMoon',
'HuaweiBrowser' => 'HuaweiBrowser',
];

/**
Expand Down