DeviceDetector::Parser::Mobile
Inherits DeviceDetector::Helper < Struct < Value < Object
Constants
ANDROID_BUILD_MODEL_REGEX = /Android [^;]+; ([^;)]+?)(?: Build|[;)])/i
ANDROID_MODEL_SHORTCUTS = {"SM-G991B" => {"Samsung", "smartphone", "Galaxy S21 5G"}, "Pixel 7" => {"Google", "smartphone", "Pixel 7"}, "M2101K9G" => {"Xiaomi", "smartphone", "Mi 11 Lite 5G"}, "BV6000" => {"Blackview", "smartphone", "BV6000"}, "CPH2207" => {"OPPO", "smartphone", "Reno 5 Pro 5G"}, "Redmi Note 11" => {"Xiaomi", "smartphone", "Redmi Note 11"}, "Nokia G20" => {"Nokia", "smartphone", "G20"}, "Moto G Power" => {"Motorola", "smartphone", "Moto G Power"}}
APP_DEVICE_MODEL_REGEX = /Device\/([^\s;)]+)/i
APPLE_DEVICE_REGEX = /\b(iPhone|iPad|iPod)\b/i
HUAWEI_VENDOR_HINTS = /Huawei|Honor|HarmonyOS|OpenHarmony/i
MOBILE_HINTS = /Mobile|Mobi|Android|iPhone|iPad|iPod|Windows Phone|BlackBerry|BB10|Opera Mini|Opera Mobi|IEMobile|Kindle|Silk|webOS|Tizen|KaiOS|Maemo|MeeGo|Symbian|PlayBook|Tablet|Phone|MIDP|CLDC|Nokia|Samsung|SonyEricsson|HTC|Huawei/i
Constructors
Class methods
Returns true when the mobile vendor rules identify a Huawei model. Honor is evaluated first to preserve the ordering of the complete parser.
huawei_regex_patterns
Returns the Huawei and Honor regular-expression sources used by .huawei?.
Instance methods
android_model_shortcut
Sourcecall
Sourcedetect_mobile(vendor, device, detected_device)
Sourcekind
Sourcemobile_entries
Sourcemobile_index
Sourcemobiles
Source