struct
DeviceDetector::Parser::Mobile
- DeviceDetector::Parser::Mobile
- Struct
- Value
- Object
Included Modules
Defined in:
device_detector/parser/mobile.crConstant Summary
-
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 -
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
Instance Method Summary
- #android_model_shortcut
- #call
- #detect_mobile(vendor, device, detected_device)
- #kind : String
- #mobile_entries
- #mobile_index
- #mobiles
Instance methods inherited from module DeviceDetector::Helper
capture_groups?(str : String)
capture_groups?,
desktop?(user_agent : String)
desktop?,
fill_groups(str : String, regex : String, user_agent : String)
fill_groups,
human_browser?(user_agent : String)
human_browser?,
regex(pattern : String, options : Regex::Options)regex(pattern : String) regex, token_candidates(index : Hash(String, Array(Int32)), user_agent : String, reverse = false) token_candidates