Giter VIP home page Giter VIP logo

device_detector's Introduction

DeviceDetector

CI

DeviceDetector is a precise and fast user agent parser and device detector written in Ruby, backed by the largest and most up-to-date user agent database.

DeviceDetector will parse any user agent and detect the browser, operating system, device used (desktop, tablet, mobile, tv, cars, console, etc.), brand and model. DeviceDetector detects thousands of user agent strings, even from rare and obscure browsers and devices.

The DeviceDetector is optimized for speed of detection, by providing optimized code and in-memory caching.

DeviceDetector is funded by the owners of Podigee the podcast hosting, analytics & monetization SaaS for podcasters big and small. and actively maintained by the development team.

This project originated as a Ruby port of the Universal Device Detection library written and maintained by Matomo Analytics. You can find the original code here: https://github.com/piwik/device-detector.

Disclaimer

This port does not aspire to be a one-to-one copy from the original code, but rather an adaptation for the Ruby language.

Still, our goal is to use the original, unchanged regex yaml files for user agent detection provided by the upstream version, in order to mutually benefit from updates and pull request to both the original and the ported versions.

Installation

Add this line to your application's Gemfile:

gem 'device_detector'

And then execute:

$ bundle

Or install it yourself as:

$ gem install device_detector

Usage

user_agent = 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.17 Safari/537.36'
client = DeviceDetector.new(user_agent)

client.name # => 'Chrome'
client.full_version # => '30.0.1599.69'

client.os_name # => 'Windows'
client.os_full_version # => '8'

# For many devices, you can also query the device name (usually the model name)
client.device_name # => 'iPhone 5'
# Device types can be one of the following: desktop, smartphone, tablet,
# feature phone, console, tv, car browser, smart display, camera,
# portable media player, phablet, smart speaker, wearable, peripheral
client.device_type # => 'smartphone'

DeviceDetector will return nil on all attributes, if the user_agent is unknown. You can make a check to ensure the client has been detected:

client.known? # => will return false if user_agent is unknown

Using Client hint

Optionally DeviceDetector is using the content of Sec-CH-UA stored in the headers to improve the accuracy of the detection :

user_agent = 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.17 Safari/537.36'
headers = {"Sec-CH-UA"=>'"Chromium";v="106", "Brave";v="106", "Not;A=Brand";v="99"'}
client = DeviceDetector.new(user_agent, headers)

client.name # => 'Brave'

Same goes with http-x-requested-with/x-requested-with :

user_agent = 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.17 Safari/537.36'
headers = {"http-x-requested-with"=>"org.mozilla.focus"}
client = DeviceDetector.new(user_agent, headers)

client.name # => 'Firefox Focus'

Memory cache

DeviceDetector will cache up 5,000 user agent strings to boost parsing performance. You can tune the amount of keys that will get saved in the cache. You have to call this code before you initialize the Detector.

DeviceDetector.configure do |config|
  config.max_cache_keys = 5_000 # increment this if you have enough RAM, proceed with care
end

If you have a Rails application, you can create an initializer, for example config/initializers/device_detector.rb.

Benchmarks

We have measured the parsing speed of almost 200,000 non-unique user agent strings and compared the speed of DeviceDetector with the two most popular user agent parsers in the Ruby community, Browser and UserAgent.

Testing machine specs

  • MacBook Pro 15", Late 2013
  • 2.6 GHz Intel Core i7
  • 16 GB 1600 MHz DDR3

Gem versions

  • DeviceDetector - 0.5.1
  • Browser - 0.8.0
  • UserAgent - 0.13.1

Code

require 'device_detector'
require 'browser'
require 'user_agent'
require 'benchmark'

user_agent_strings = File.read('./tmp/user_agent_strings.txt').split("\n")

## Benchmarks

Benchmark.bm(15) do |x|
  x.report('device_detector') {
    user_agent_strings.each { |uas| DeviceDetector.new(uas).name }
  }
  x.report('browser') {
    user_agent_strings.each { |uas| Browser.new(ua: uas).name }
  }
  x.report('useragent') {
    user_agent_strings.each { |uas| UserAgent.parse(uas).browser }
  }
end

Results

                      user     system      total        real
device_detector   0.925603   0.020928   0.946531 (  0.948750)
browser           3.555590   0.014877   3.570467 (  3.575951)
useragent         3.264011   0.032327   3.296338 (  3.301772)

                      user     system      total        real
device_detector   0.915578   0.021295   0.936873 (  0.938698)
browser           3.600674   0.022312   3.622986 (  3.635185)
useragent         3.425424   0.054298   3.479722 (  3.500929)

                      user     system      total        real
device_detector   0.916608   0.022739   0.939347 (  0.940993)
browser           3.624404   0.027489   3.651893 (  3.667863)
useragent         3.442139   0.054376   3.496515 (  3.519747)

Detectable clients, bots and devices

Updated on 2023-11-27

Bots

2ip, 360 Monitoring, 360Spider, Abonti, Aboundexbot, Acoon, AdAuth, Adbeat, AddThis.com, ADMantX, ADmantX Service Fetcher, Adsbot, AdsTxtCrawler, adstxtlab.com, aHrefs Bot, AhrefsSiteAudit, aiHitBot, Alexa Crawler, Alexa Site Audit, Allloadin Favicon Bot, Amazon Bot, Amazon ELB, Amazon Route53 Health Check, Amorank Spider, Analytics SEO Crawler, Ant, ApacheBench, Applebot, AppSignalBot, Arachni, archive.org bot, ArchiveBot, ArchiveBox, Asana, Ask Jeeves, AspiegelBot, Awario, Backlink-Check.de, BacklinkCrawler, Baidu Spider, Barkrowler, BazQux Reader, BDCbot, Better Uptime Bot, BingBot, Birdcrawlerbot, BitlyBot, BitSight, Blekkobot, BLEXBot Crawler, Bloglovin, Blogtrottr, BoardReader, BoardReader Blog Indexer, Bountii Bot, BrandVerity, BrightEdge, Browsershots, BUbiNG, Buck, BuiltWith, Butterfly Robot, Bytespider, CareerBot, Castro 2, Catchpoint, CATExplorador, ccBot crawler, CensysInspect, Charlotte, ChatGPT, Choosito, Chrome Privacy Preserving Prefetch Proxy, Cincraw, CISPA Web Analyzer, Cliqzbot, CloudFlare Always Online, CloudFlare AMP Fetcher, Cloudflare Custom Hostname Verification, Cloudflare Diagnostics, Cloudflare Health Checks, Cloudflare Security Insights, Cloudflare SSL Detector, Cloudflare Traffic Manager, Cocolyzebot, Collectd, colly, CommaFeed, COMODO DCV, Comscore, ContentKing, Cookiebot, Crawldad, Crawlson, CriteoBot, CrowdTangle, CSS Certificate Spider, Cyberscan, Cốc Cốc Bot, Datadog Agent, DataForSeoBot, datagnionbot, Datanyze, Dataprovider, DataXu, Daum, Dazoobot, deepnoc, Diffbot, Discobot, Discord Bot, Disqus, DNSResearchBot, Domain Re-Animator Bot, DomainAppender, DomainCrawler, Domains Project, DomainStatsBot, DotBot, Dotcom Monitor, DuckDuckGo Bot, Easou Spider, eCairn-Grabber, EFF Do Not Track Verifier, EMail Exractor, EmailWolf, Embedly, Entfer, evc-batch, Everyfeed, ExaBot, ExactSeek Crawler, Exchange check, Expanse, eZ Publish Link Validator, Ezgif, Ezooms, Facebook External Hit, Faveeo, Feed Wrangler, Feedbin, FeedBurner, Feedly, Feedspot, Femtosearch, Fever, Findxbot, Flipboard, FreeWebMonitoring, FreshRSS, GDNP, Generic Bot, Genieo Web filter, Gigablast, Gigabot, GitCrawlerBot, Gluten Free Crawler, Gmail Image Proxy, Gobuster, Goo, Google Cloud Scheduler, Google Favicon, Google PageSpeed Insights, Google Partner Monitoring, Google Search Console, Google Stackdriver Monitoring, Google StoreBot, Google Structured Data Testing Tool, Googlebot, Gowikibot, GPTBot, Grammarly, Grapeshot, Gregarius, GTmetrix, GumGum Verity, hackermention, Hatena Bookmark, Hatena Favicon, Headline, Heart Rails Capture, Heritrix, Heureka Feed, HTTPMon, httpx, HuaweiWebCatBot, HubPages, HubSpot, ICC-Crawler, ichiro, IDG/IT, Iframely, IIS Site Analysis, Inetdex Bot, Infegy, InfoTigerBot, Inktomi Slurp, inoreader, Intelligence X, InternetMeasurement, IONOS Crawler, IP-Guide Crawler, IPIP, IPS Agent, JobboerseBot, JungleKeyThumbnail, K6, Kaspersky, KlarnaBot, KomodiaBot, Kouio, Kozmonavt, l9explore, l9tcpid, Larbin web crawler, LastMod Bot, LCC, LeakIX, Let's Encrypt Validation, Lighthouse, Linespider, Linkdex Bot, LinkedIn Bot, LinkpadBot, LinkPreview, LinkWalker, LTX71, Lumar, LumtelBot, Lycos, MaCoCu, MADBbot, Magpie-Crawler, MagpieRSS, Mail.Ru Bot, masscan, masscan-ng, Mastodon Bot, Matomo, Meanpath Bot, Mediatoolkit Bot, MegaIndex, MeltwaterNews, MetaInspector, MetaJobBot, MicroAdBot, Mixrank Bot, MJ12 Bot, Mnogosearch, MojeekBot, Monitor.Us, MoodleBot Linkchecker, Morningscore Bot, MTRobot, Munin, MuscatFerret, Nagios check_http, NalezenCzBot, nbertaupete95, Neevabot, Netcraft Survey Bot, netEstate, NetLyzer FastProbe, NetResearchServer, NetSystemsResearch, Netvibes, NETZZAPPEN, NewsBlur, NewsGator, Newslitbot, NiceCrawler, Nimbostratus Bot, NLCrawler, Nmap, Notify Ninja, Nutch-based Bot, Nuzzel, oBot, Octopus, Odnoklassniki Bot, Omgili bot, Onalytica, OnlineOrNot Bot, Openindex Spider, OpenLinkProfiler, OpenWebSpider, Orange Bot, Outbrain, Overcast Podcast Sync, Page Modified Pinger, Pageburst, PagePeeker, PageThing, Panscient, PaperLiBot, parse.ly, PATHspider, PayPal IPN, PDR Labs, Petal Bot, Phantomas, PHP Server Monitor, phpMyAdmin, Picsearch bot, PingAdmin.Ru, Pingdom Bot, Pinterest, PiplBot, Plukkie, Pocket, Pompos, PritTorrent, Project Patchwatch, Project Resonance, Prometheus, PRTG Network Monitor, QuerySeekerSpider, Quora Bot, Quora Link Preview, Qwantify, Rainmeter, RamblerMail Image Proxy, Reddit Bot, RenovateBot, Repo Lookout, ReqBin, Research Scan, Riddler, Robozilla, RocketMonitorBot, Rogerbot, ROI Hunter, RSSRadio Bot, Ryowl, SabsimBot, SafeDNSBot, Scamadviser External Hit, Scooter, ScoutJet, Scraping Robot, Scrapy, Screaming Frog SEO Spider, ScreenerBot, Sectigo DCV, security.txt scanserver, Seekport, Sellers.Guide, Semantic Scholar Bot, Semrush Bot, SEMrush Reputation Management, Sensika Bot, Sentry Bot, Seobility, SEOENGBot, SEOkicks, SEOkicks-Robot, seolyt, Seolyt Bot, Seoscanners.net, Serendeputy Bot, serpstatbot, Server Density, Seznam Bot, Seznam Email Proxy, Seznam Zbozi.cz, sfFeedReader, ShopAlike, Shopify Partner, ShopWiki, SilverReader, SimplePie, SISTRIX Crawler, SISTRIX Optimizer, Site24x7 Website Monitoring, Siteimprove, SitemapParser-VIPnytt, SiteSucker, Sixy.ch, Skype URI Preview, Slackbot, SMTBot, Snap URL Preview Service, Snapchat Proxy, Sogou Spider, Soso Spider, Sparkler, Speedy, Spinn3r, Spotify, Sprinklr, Sputnik Bot, Sputnik Favicon Bot, Sputnik Image Bot, sqlmap, SSL Labs, start.me, Startpagina Linkchecker, StatusCake, Sublinq, Superfeedr Bot, SurdotlyBot, Survey Bot, t3versions, Taboolabot, Tag Inspector, Tarmot Gezgin, tchelebi, TelegramBot, TestCrawler, The Knowledge AI, theoldreader, ThinkChaos, TigerBot, TinEye Crawler, Tiny Tiny RSS, TLSProbe, TraceMyFile, Trendiction Bot, Turnitin, TurnitinBot, TweetedTimes Bot, Tweetmeme Bot, Twingly Recon, Twitterbot, UkrNet Mail Proxy, uMBot, UniversalFeedParser, Uptime Robot, Uptime-Kuma, Uptimebot, URLAppendBot, URLinspector, Vagabondo, Velen Public Web Crawler, Vercel Bot, VeryHip, Visual Site Mapper Crawler, VK Share Button, Vuhuv Bot, W3C CSS Validator, W3C I18N Checker, W3C Link Checker, W3C Markup Validation Service, W3C MobileOK Checker, W3C Unified Validator, Wappalyzer, WebbCrawler, WebDataStats, Weborama, WebPageTest, WebPros, WebSitePulse, WebThumbnail, Webwiki, WellKnownBot, WeSEE:Search, WeViKaBot, WhatCMS, WhereGoes, WikiDo, Willow Internet Crawler, WooRank, WordPress, Wotbox, XenForo, XoviBot, YaCy, Yahoo Gemini, Yahoo! Cache System, Yahoo! Japan BRW, Yahoo! Japan WSC, Yahoo! Link Preview, Yahoo! Mail Proxy, Yahoo! Slurp, YaK, Yandex Bot, Yeti/Naverbot, Yottaa Site Monitor, Youdao Bot, Yourls, Yunyun Bot, Zaldamo, Zao, Ze List, zgrab, Zookabot, ZoominfoBot, ZumBot

Clients

'sodes, 115 Browser, 1Password, 2345 Browser, 2tch, 360 Browser, 360 Phone Browser, 7654 Browser, 7Star, ABrowse, ActionExtension, AdBlock Browser, Adobe Creative Cloud, Adobe IPM, Adobe NGL, Adobe Synchronizer, Adori, Agora, Aha Radio 2, AIDA64, aiohttp, Airmail, Airr, Airsonic, Akka HTTP, Akregator, Alexa Media Player, AliExpress, Alipay, All You Can Books, AllHitMusicRadio, Aloha Browser, Aloha Browser Lite, ALVA, Amarok, Amaya, Amazon Fire, Amazon Music, Amazon Shopping, Amiga Aweb, Amiga Voyager, Amigo, Anchor, AnchorFM, Android Browser, Android License Verification Library, AndroidDownloadManager, Anghami, ANT Fresco, AntennaPod, ANTGalio, AntiBrowserSpy, Anybox, AnyEvent HTTP, Anytime Podcast Player, AOL Desktop, AOL Shield, AOL Shield Pro, Apache HTTP Client, APK Downloader, APN Browser, Apollo, Apple iMessage, Apple Mail, Apple News, Apple Podcasts, Apple PubSub, Apple Reminders, Apple TV, Arctic Fox, Aria2, Arora, Artifactory, Arvin, Arvocast, ASUS Updater, Atom, Atomic Web Browser, Audacious, Audacy, Audible, Audio, Audio Now, Audiobooks, Avant Browser, Avast Secure Browser, AVG Secure Browser, Avid Link, Avira Secure Browser, Awasu, AwoX, Axios, Azure Data Factory, B-Line, Background Intelligent Transfer Service, Baidu Box App, Baidu Browser, Baidu Input, Baidu Spark, Ballz, Bangla Browser, Bank Millenium, Banshee, Barca, Basecamp, BashPodder, Basilisk, BathyScaphe, Battle.net, BB2C, BBC News, Be Focused, Beaker Browser, Beamrise, Bear, Beonex, BetBull, BeyondPod, Bible, Bible KJV, Binance, Bing iPad, BingWebApp, Bitcoin Core, Bitsboard, Biyubi, BlackBerry Browser, Blackboard, BlackHawk, Blitz, Bloket, Blue Browser, Blue Proxy, BlueStacks, Bolt, BonPrix, Bonsai, Bookmobile, Bookshelf, Boom, Boomplay, Borealis Navigator, Bose Music, Bose SoundTouch, Boxee, bPod, Brave, Breaker, Breez, BriskBard, Broadcast, Broadway Podcast Network, Browlser, BrowseHere, Browser app, BrowserPlus, BrowseX, Browzar, Buildah, BuildKit, Bullhorn, Bunjalloo, Byffox, C++ REST SDK, Camino, Capital, capsule.fm, CarrierWave, Castamatic, Castaway, CastBox, castero, castget, Castro, Castro 2, CCleaner, Centaury, CGN, ChanjetCloud, Charon, Chedot, Cheetah Browser, Cheshire, Chim Lac, ChMate, Chrome, Chrome Frame, Chrome Mobile, Chrome Mobile iOS, Chrome Update, Chrome Webview, ChromePlus, Chromium, Chromium GOST, Ciisaa, Citrix Workspace, Classic FM, Clementine, Client, Clovia, CM Browser, COAF SMART Citizen, Coast, Coc Coc, Colibri, CometBird, Comodo Dragon, Conkeror, Containerd, containers, CoolBrowser, CoolNovo, Copied, Cornowser, Cortana, COS Browser, Cosmicast, Covenant Eyes, cPanel HTTP Client, CPod, CPU-Z, Craving Explorer, Crazy Browser, cri-o, CrosswalkApp, Crusta, Cunaguaro, curl, Cyberfox, CyBrowser, Damus, Dart, Daum, DAVdroid, dbrowser, De Standaard, Decentr, Deepnet Explorer, Deezer, deg-degan, Deledao, Delta Browser, Deno, DeskBrowse, DevCasts, DeviantArt, Dillo, DingTalk, DIRECTV, Discord, DManager, docker, Dogecoin Core, DoggCatcher, Dolphin, Don't Waste My Time!, Dooble, Dorado, Dot Browser, douban App, DoubleTwist CloudPlayer, Doughnut, Down, Downcast, Downie, Downloader, Dr. Watson, DStream Air, DuckDuckGo Privacy Browser, Ecosia, Edge Update, Edge WebView, Element Browser, Elements Browser, Elinks, eM Client, Emacs, EMAudioPlayer, Embarcadero URI Client, Emby Theater, Epic, Epic Games Launcher, ESET Remote Administrator, Espial TV Browser, eToro, EUI Browser, Evernote, Evolve Podcast, Expedia, Expo, eZ Browser, F-Secure SAFE, Facebook, Facebook Audience Network, Facebook Groups, Facebook Lite, Facebook Messenger, Facebook Messenger Lite, faidr, Falkon, Faraday, fasthttp, Fathom, Faux Browser, FeedDemon, Feeddler RSS Reader, FeedR, FeedStation, Fennec, ffmpeg, FFUF, FileDownloader, Files, Firebird, Firefox, Firefox Focus, Firefox Mobile, Firefox Mobile iOS, Firefox Reality, Firefox Rocket, Fireweb, Fireweb Navigator, Flash Browser, Flast, Flipboard App, Flipp, Flock, Floorp, Flow, Flow Browser, Fluid, FlyCast, Focus Keeper, Focus Matrix, foobar2000, Foobar2000, Fountain, Franz, Free Download Manager, FreeU, Gaana, Galeon, Garmin fenix 5X, Garmin Forerunner, GBWhatsApp, GeoIP Update, GetPodcast, Ghostery Privacy Browser, GinxDroid Browser, Git, git-annex, GitHub Desktop, Glass Browser, GlobalProtect, GNOME Web, go-container registry, Go-http-client, GoBrowser, GOG Galaxy, Gold, GoldenPod, GoLoud, GoNative, Goodpods, GoodReader, Google Drive, Google Earth, Google Earth Pro, Google Fiber TV, Google Go, Google HTTP Java Client, Google Nest Hub, Google Photos, Google Play Newsstand, Google Plus, Google Podcasts, Google Search App, Google Tag Manager, got, gPodder, GRequests, GroupMe, gRPC-Java, GStreamer, Guacamole, Guzzle (PHP HTTP Client), gvfs, hackney, Hago, Hammel, HandBrake, Harbor registry client, HardCast, Hark Audio, Harman Browser, HasBrowser, Hawk Quick Browser, Hawk Turbo Browser, Headless Chrome, Heart, Helio, Helm, HermesPod, HeyTapBrowser, Hi Browser, HiCast, Hik-Connect, Himalaya, HiSearch, HisThumbnail, hola! Browser, HotJava, HP Smart, HTC Streaming Player, HTML Parser, HTTP request maker, HTTP:Tiny, HTTP_Request2, HTTPie, httplib2, HTTPX, Huawei Browser, Huawei Browser Mobile, Hubhopper, HyperCatcher, IBrowse, iBrowser, iBrowser Mini, iCab, iCab Mobile, iCatcher, IceCat, IceDragon, Iceweasel, IE Mobile, iHeartRadio, IMO HD Video Calls & Chat, IMO International Calls & Chat, Insomnia REST Client, Inspect Browser, Instabridge, Instacast, Instagram App, Instapaper, Internet Explorer, iOS Application, Iridium, Iron, Iron Mobile, Isivioo, iTunes, iVoox, Jakarta Commons HttpClient, Jam, JaneStyle, JaneView, Japan Browser, Jasmine, Java, Java HTTP Client, JavaFX, JetBrains Omea Reader, JHelioviewer, Jig Browser, Jig Browser Plus, Jio Browser, JioSaavn, Jitsi Meet, JJ2GO, JRiver Media Center, jsdom, Juice, Jungle Disk, Just Audio, Just Listen, K-meleon, K.Browser, KaiOS Downloader, Kajabi, KakaoTalk, Kapiko, Kasts, Kazehakase, Keeper Password Manager, Keepsafe Browser, Kids Listen, KidsPod, Kik, Kindle Browser, Kinza, Kiwi, KKBOX, Klarna, Kode Browser, Kodi, Konqueror, Kylo, L.A. Times, Lagatos Browser, Landis+Gyr AIM Browser, Laughable, Lazada, LBC, Lenovo Browser, Lexi Browser, LG Browser, LG Player, libdnf, libpod, libsoup, Libsyn, LieBaoFast, Liferea, Light, Lilo, Line, LinkedIn, Links, Listen, LiSTNR, Liulo, Live5ch, Logi Options+, Lolifox, LoseIt!, Lotus Notes, Lovense Browser, LT Browser, LUA OpenResty NGINX, LuaKit, Lulumi, Luminary, Lunascape, Lunascape Lite, Lynx, Macrium Reflect, Maelstrom, MailBar, Mailbird, Mailspring, Mandarin, MAUI WAP Browser, Maxthon, MBolsa, mCent, Mechanize, MediaMonkey, Megaphone, Meizu Browser, MEmpresas, Menucast, Mercantile Bank of Michigan, Mercury, MessengerX, Meta Business Suite, MetaTrader, MicroB, Microsoft Bing Search, Microsoft Edge, Microsoft Lync, Microsoft Office, Microsoft Office $1, Microsoft Office Mobile, Microsoft OneDrive, Microsoft Outlook, Microsoft Start, Microsoft Store, Midori, Mikrotik Fetch, Mimir, Minimo, Mint Browser, Miro, MIUI Browser, MixerBox, Mobicip, Mobile Safari, Mobile Silk, mobile.de, MobileSMS, Monument Browser, MoonFM, MPlayer, mpv, Msray-Plus, Music Player Daemon, MusicBee, MxNitro, My Bentley, My Watch Party, My World, Mypal, MyTuner, Naver, NAVER Mail, Navigateur Web, NCSA Mosaic, NET.mede, Netflix, NetFront, NetFront Life, NetNewsWire, NetPositive, Netscape, NetSurf, NewsArticle App, Newsbeuter, NewsBlur, NewsBlur Mobile App, Newsboat, Newsly, NexPlayer, Nextcloud, NFS Browser, Nightingale, Node Fetch, Nokia Browser, Nokia OSS Browser, Nokia Ovi Browser, Norton Secure Browser, Notion, Nox Browser, NPR One, NRC, NRC Audio, NTENT Browser, NTV Mobil, NuMuKi Browser, Obigo, OceanHero, Oculus Browser, Odd Browser, Odin, Odnoklassniki, Odyssey Web Browser, Off By One, OfferUp, OhHai Browser, OKDownload Library, OkHttp, OmniWeb, ONE Browser, Opal Travel, Open Build Service, OpenFin, Openwave Mobile Browser, Opera, Opera Devices, Opera GX, Opera Mini, Opera Mini iOS, Opera Mobile, Opera Neon, Opera News, Opera Next, Opera Touch, Opera Updater, Oppo Browser, Orange Radio, Orca, Ordissimo, Oregano, Origin In-Game Overlay, Origyn Web Browser, Otter Browser, Outcast, Outlook Express, Overcast, Overhaul FM, Pa11y, Paint by Number, Palco MP3, Pale Moon, Palm Blazer, Palm Pre, Palm WebPro, Palmscape, Pandora, Papers, PeaCast, Peeps dBrowser, Perfect Browser, Perl, Perl REST::Client, Petal Search App, Phantom Browser, Phoenix, Phoenix Browser, PHP cURL Class, Pi Browser, Pic Collage, PICO Browser, Pinterest, Playapod, Player FM, PlayFree Browser, Plex Media Server, Pocket Casts, PocketBook Browser, Podbay, Podbean, Podcast & Radio Addict, Podcast App, Podcast Guru, Podcast Player, Podcast Republic, Podcastly, Podcat, Podcatcher Deluxe, Podchaser, Podclipper, PodCruncher, Podeo, Podfriend, Podhero, Podimo, PodKast, Podkicker Pro, Podkicker$1, PodLP, PodMe, PodMN, PodNL, Podopolo, Podplay, PodPuppy, Pods, PodTrapper, podU, Podurama, Podverse, Podvine, Podyssey, Polaris, Polarity, PolyBrowser, Polypane, Postbox, Postman Desktop, PowerShell, PRDownloader, PritTorrent, PrivacyWall, Procast, PSI Secure Browser, Puffin, PugPig Bolt, Pulp, Python Requests, Python urllib, Q-municate, Qazweb, qBittorrent, QQ Browser, QQ Browser Lite, QQ Browser Mini, QQMusic, QtWebEngine, Quark, quic-go, Quick Search TV, QuickCast, QuickTime, QuiteRSS, Quora, QupZilla, Qutebrowser, Qwant Mobile, R, r-curl, Radio Italiane, Radio Next, Radio Zeno, radio.$1, RadioApp, Radioline, RadioPublic, Raindrop.io, Rambox Pro, Rave Social, Razer Synapse, RDDocuments, ReactorNetty, ReadKit, Realme Browser, Reddit, Reeder, Rekonq, rekordbox, Repod, req, reqwest, Reqwireless WebViewer, REST Client for Ruby, RestSharp, Resty, resty-requests, Rhythmbox, RNPS Action Cards, Roblox, RoboForm, Rocket Chat, RockMelt, Roku Browser, RSS Bandit, RSS Junkie, RSSOwl, RSSRadio, ruby, Rutube, SachNoi, Safari, Safari Search Helper, Safari Technology Preview, Safari View Service, Safe Exam Browser, SafeIP, Sailfish Browser, SalamWeb, Samsung Browser, Samsung Magician, Samsung Podcasts, ScalaJ HTTP, SeaMonkey, Secure Browser, Secure Private Browser, Seewo Browser, SEMC-Browser, Seraphic Sraf, ServeStream, Seznam Browser, SFive, Shadow, Shadowrocket, Shiira, Shopee, ShowMe, SimpleBrowser, Sina Weibo, Siri, SiriusXM, SiteKiosk, Sizzy, Skopeo, Skyeng, Skyeng Teachers, Skyfire, Skype, Skype for Business, Slack, Sleipnir, Slim Framework, SlimerJS, Slimjet, Smart Lenovo Browser, Smooz, Snapchat, Snipd, Snowshoe, Sogou Explorer, Sogou Mobile Browser, SogouSearch App, SohuNews, Soldier, Songbird, Sonnet, SONOS, Sony Media Go, Sony PlayStation 5, Soul Browser, SoundOn, SoundWaves, SP Browser, Spectre Browser, Splash, SPORT1, Spotify, Spreaker, Sputnik Browser, Stagefright, Stampy Browser, Stargon, START Internet Browser, Startsiden, Steam In-Game Overlay, Stitcher, StoryShots, Streamlabs OBS, Streamy, Strimio, Stringer, StudioDisplay, SubStream, Sunrise, Super Fast Browser, SuperBird, surf, Surf Browser, Surfshark, Sushi Browser, Swiftfox, Swinsian, Swoot, Symfony, T+Browser, T-Browser, t-online.de Browser, Tao Browser, Taobao, Teams, TenFourFox, Tenta Browser, Tesla Browser, The Bat!, The New York Times, The Wall Street Journal, Theyub, Thunder, Thunderbird, tieba, TikTok, Tizen Browser, ToGate, TopBuzz, Trackable, TradingView, Treble.fm, TuneIn Radio, TuneIn Radio Pro, Tungsten, Turtlecast, Tuya Smart Life, TV Bro, TVirl, TweakStyle, twinkle, Twitter, Twitterrific, Typhoeus, U Browser, U-Cursos, Ubook Player, UBrowser, UC Browser, UC Browser HD, UC Browser Mini, UC Browser Turbo, UCast, uclient-fetch, Uconnect LIVE, Uforia, Ultimate Sitemap Parser, undici, Unibox, Unirest for Java, UnityPlayer, UR Browser, urlgrabber (yum), uTorrent, Uzbl, Vast Browser, Venus Browser, Viasat Browser, Viber, Victor Reader Stream 3, Victor Reader Stream New Generation, Victor Reader Stream Trek, Vision Mobile Browser, Visual Studio Code, Vivaldi, vivo Browser, VLC, VMware AirWatch, Vodacast, Vuhuv, Vuze, Waterfox, Wattpad, Wayback Machine, Wear Internet Browser, Web Explorer, WebDAV, WebPositive, WeChat, WeChat Share Extension, WeTab Browser, Wget, WH Questions, Whale Browser, WhatsApp, WhatsApp+2, Whisper, Winamp, Windows Antivirus, Windows CryptoAPI, Windows Delivery Optimization, Windows HTTP, Windows Mail, Windows Media Player, Windows Push Notification Services, Windows Update Agent, WinHttp WinHttpRequest, Wireshark, Wirtschafts Woche, Wolvic, Word Cookies!, wOSBrowser, WPS Office, WWW-Mechanize, Wynk Music, XBMC, Xiao Yu Zhou, Xiino, xStand, Xtream Player, Xvast, Y8 Browser, Yaani Browser, YAGI, Yahoo Mail, Yahoo OneSearch, Yahoo! Japan, Yahoo! Japan Browser, YakYak, Yandex, Yandex Browser, Yandex Browser Lite, Yandex Music, Yapa, Yelp Mobile, Yolo Browser, YouCare, YouTube, Zalo, ZEPETO, Zetakey, Zoho Chat, Zune, Zvu

Devices

10moons, 2E, 360, 3GNET, 3GO, 3Q, 4Good, 4ife, 5IVE, 7 Mobile, 8848, A&K, A1, A95X, Accent, Accesstyle, Ace, Acer, Acteck, actiMirror, Adronix, Advan, Advance, Advantage Air, AEEZO, AFFIX, AfriOne, AG Mobile, AGM, AIDATA, Ainol, Airis, Airness, AIRON, Airpha, Airtel, Airties, AIS, Aiuto, Aiwa, Akai, AKIRA, Alba, Alcatel, Alcor, ALDI NORD, ALDI SÜD, Alfawise, Aligator, AllCall, AllDocube, ALLINmobile, Allview, Allwinner, Alps, Altech UEC, Altice, altron, Altus, AMA, Amazon, AMCV, AMGOO, Amigoo, Amino, Amoi, Andowl, Angelcare, Anker, Anry, ANS, ANXONIT, AOC, Aocos, AOpen, Aoro, Aoson, AOYODKG, Apple, Aquarius, Archos, Arian Space, Ark, ArmPhone, Arnova, ARRIS, Artel, Artizlee, ArtLine, Arçelik, Asano, Asanzo, Ask, Aspera, ASSE, Assistant, Astro, Asus, AT&T, Athesi, Atmaca Elektronik, ATMAN, ATOL, Atom, Attila, Atvio, Audiovox, AURIS, Autan, AUX, Avaya, Avenzo, AVH, Avvio, Awow, AWOX, AXEN, Axioo, AXXA, Axxion, AYYA, Azumi Mobile, b2m, Backcell, BAFF, BangOlufsen, Barnes & Noble, BARTEC, BASE, BAUHN, BB Mobile, BBK, BDF, BDQ, BDsharing, Beafon, Becker, Beeline, Beelink, Beetel, Beista, Beko, Bellphone, Benco, Benesse, BenQ, BenQ-Siemens, BenWee, Benzo, Beyond, Bezkam, BGH, Bigben, BIHEE, BilimLand, Billion, Billow, BioRugged, Bird, Bitel, Bitmore, Bittium, Bkav, Black Bear, Black Fox, Blackpcs, Blackview, Blaupunkt, Bleck, BLISS, Blloc, Blow, Blu, Bluboo, Bluebird, Bluedot, Bluegood, BlueSky, Bluewave, BluSlate, BMAX, Bmobile, BMXC, Bobarry, bogo, Bolva, Bookeen, Boost, Boway, bq, BrandCode, Brandt, BRAVE, Bravis, BrightSign, Brigmton, Brondi, BROR, BS Mobile, Bubblegum, Bundy, Bush, BuzzTV, C5 Mobile, CAGI, Camfone, Canal Digital, Canguro, Capitel, Captiva, Carbon Mobile, Carrefour, Casio, Casper, Cat, Cavion, Ceibal, Celcus, Celkon, Cell-C, Cellacom, CellAllure, Cellution, Centric, CG Mobile, CGV, Chainway, Changhong, Cherry Mobile, Chico Mobile, ChiliGreen, China Mobile, China Telecom, Chuwi, CipherLab, Citycall, CKK Mobile, Claresta, Clarmin, CLAYTON, ClearPHONE, Clementoni, Cloud, Cloudfone, Cloudpad, Clout, CnM, Cobalt, Coby Kyros, Colors, Comio, Compal, Compaq, COMPUMAX, ComTrade Tesla, Conceptum, Concord, ConCorde, Condor, Connectce, Connex, Conquest, Contixo, Coolpad, Coopers, CORN, Cosmote, Covia, Cowon, COYOTE, CreNova, Crescent, Cricket, Crius Mea, Crony, Crosscall, Crown, Ctroniq, Cube, CUBOT, CVTE, Cwowdefu, Cyrus, D-Link, D-Tech, Daewoo, Danew, DangcapHD, Dany, DASS, Datalogic, Datamini, Datang, Datawind, Datsun, Dazen, DbPhone, Dbtel, Dcode, DEALDIG, Dell, Denali, Denver, Desay, DeWalt, DEXP, DEYI, DF, DGTEC, Dialog, Dicam, Digi, Digicel, DIGICOM, Digidragon, DIGIFORS, Digihome, Digiland, Digit4G, Digma, DIJITSU, DIKOM, DIMO, Dinax, DING DING, DISH, Disney, Ditecma, Diva, DiverMax, Divisat, DIXON, DL, DMM, DNS, DoCoMo, Doffler, Dolamee, Dom.ru, Doogee, Doopro, Doov, Dopod, Doppio, DORLAND, Doro, DPA, DRAGON, Dragon Touch, Dreamgate, DreamStar, DreamTab, Droxio, DSDevices, DSIC, Dtac, Dune HD, DUNNS Mobile, Durabook, Duubee, Dyon, E-Boda, E-Ceros, E-tel, Eagle, Easypix, EBEN, EBEST, Echo Mobiles, ecom, ECON, ECOO, ECS, EE, EFT, EGL, Einstein, EKINOX, EKO, Eks Mobility, EKT, ELARI, Elecson, Electroneum, ELECTRONIA, Elekta, Element, Elenberg, Elephone, Elevate, Elong Mobile, Eltex, Ematic, Emporia, ENACOM, Energizer, Energy Sistem, Engel, ENIE, Enot, eNOVA, Entity, Envizen, Ephone, Epic, Epik One, Epson, Equator, Ergo, Ericsson, Ericy, Erisson, Essential, Essentielb, eSTAR, Eton, eTouch, Etuline, Eurocase, Eurostar, Evercoss, Everest, Everex, Evertek, Evolio, Evolveo, Evoo, EVPAD, EvroMedia, EWIS, EXCEED, Exmart, ExMobile, EXO, Explay, Extrem, EYU, Ezio, Ezze, F&U, F+, F150, F2 Mobile, Facebook, Facetel, Facime, Fairphone, Famoco, Famous, Fantec, FaRao Pro, Farassoo, FarEasTone, Fengxiang, FEONAL, Fero, FFF SmartLife, Figgers, FiGi, FiGO, FiiO, FILIX, FinePower, Finlux, FireFly Mobile, FISE, Fluo, Fly, FLYCAT, FMT, FNB, FNF, Fondi, Fonos, FOODO, FORME, Formuler, Forstar, Fortis, FOSSiBOT, Four Mobile, Fourel, Foxconn, FoxxD, FPT, Freetel, Frunsi, Fuego, Fujitsu, Funai, Fusion5, Future Mobile Technology, Fxtec, G-TiDE, G-Touch, Galactic, Galaxy Innovations, Gamma, Garmin-Asus, Gateway, Gazer, Geanee, Geant, Gear Mobile, Gemini, General Mobile, Genesis, GEOFOX, Geotel, Geotex, GEOZON, GFive, Gfone, Ghia, Ghong, Ghost, Gigabyte, Gigaset, Gini, Ginzzu, Gionee, GIRASOLE, Globex, Glofiish, GLONYX, GLX, GOCLEVER, Gocomma, GoGEN, Gol Mobile, GoldMaster, Goly, Gome, GoMobile, GOODTEL, Google, Goophone, Gooweel, Gplus, Gradiente, Grape, Great Asia, Gree, Green Orange, Greentel, Gresso, Gretel, GroBerwert, Grundig, Gtel, GTMEDIA, Guophone, H133, H96, Hafury, Haier, Haipai, Hamlet, Hammer, Handheld, HannSpree, HAOQIN, HAOVM, Hardkernel, Harper, Hartens, Hasee, Hathway, HDC, HeadWolf, Helio, HERO, HexaByte, Hezire, Hi, Hi Nova, Hi-Level, Hiberg, High Q, Highscreen, HiHi, HiKing, HiMax, HIPER, Hipstreet, Hisense, Hitachi, Hitech, HKPro, HLLO, Hoffmann, Hometech, Homtom, Honeywell, Hoozo, Horizon, Horizont, Hosin, Hot Pepper, Hotel, HOTREALS, Hotwav, How, HP, HTC, Huadoo, Huagan, Huavi, Huawei, Hugerock, Humax, Hurricane, Huskee, Hykker, Hytera, Hyundai, Hyve, i-Cherry, I-INN, i-Joy, i-mate, i-mobile, iBall, iBerry, ibowin, iBrit, IconBIT, iData, iDino, iDroid, iGet, iHunt, Ikea, IKI Mobile, iKoMo, iKon, IKU Mobile, iLA, iLepo, iLife, iMan, iMars, iMI, IMO Mobile, Imose, Impression, iMuz, iNavi, INCAR, Inch, Inco, iNew, Infiniton, Infinix, InFocus, InfoKit, InFone, Inhon, Inkti, InnJoo, Innos, Innostream, iNo Mobile, Inoi, iNOVA, INQ, Insignia, INSYS, Intek, Intel, Intex, Invens, Inverto, Invin, iOcean, iOutdoor, iPEGTOP, iPro, iQ&T, IQM, IRA, Irbis, iReplace, Iris, iRobot, iRola, iRulu, iSafe Mobile, iStar, iSWAG, IT, iTel, iTruck, IUNI, iVA, iView, iVooMi, ivvi, iWaylink, iXTech, iYou, iZotron, JAY-Tech, Jedi, Jeka, Jesy, JFone, Jiake, Jiayu, Jinga, Jio, Jivi, JKL, Jolla, Joy, JoySurf, JPay, JREN, Jumper, Juniper Systems, Just5, JVC, JXD, K-Lite, K-Touch, Kaan, Kaiomy, Kalley, Kanji, Kapsys, Karbonn, Kata, KATV1, Kazam, Kazuna, KDDI, Kempler & Strauss, Kenbo, Keneksi, Kenxinda, Khadas, Kiano, Kingbox, Kingstar, Kingsun, KINGZONE, Kinstone, Kiowa, Kivi, Klipad, KN Mobile, Kocaso, Kodak, Kogan, Komu, Konka, Konrow, Koobee, Koolnee, Kooper, KOPO, Koridy, Koslam, Kraft, KREZ, KRIP, KRONO, Krüger&Matz, KT-Tech, KUBO, KuGou, Kuliao, Kult, Kumai, Kurio, Kvant, Kyocera, Kyowon, Kzen, KZG, L-Max, LAIQ, Land Rover, Landvo, Lanin, Lanix, Lark, Laurus, Lava, LCT, Le Pan, Leader Phone, Leagoo, Leben, LeBest, Lectrus, Ledstar, LeEco, Leelbox, Leff, Legend, Leke, Lemco, LEMFO, Lemhoov, Lenco, Lenovo, Leotec, Lephone, Lesia, Lexand, Lexibook, LG, Liberton, Lifemaxx, Lime, Lingwin, Linnex, Linsar, Linsay, Listo, LNMBBS, Loewe, Logic, Logic Instrument, Logicom, LOKMAT, Loview, Lovme, LPX-G, LT Mobile, Lumigon, Lumitel, Lumus, Luna, Luxor, LYF, M-Horse, M-Tech, M.T.T., M3 Mobile, M4tel, MAC AUDIO, Macoox, Mafe, Magicsee, Magnus, Majestic, Malata, Mango, Manhattan, Mann, Manta Multimedia, Mantra, Mara, Marshal, Mascom, Massgo, Masstel, Master-G, Mastertech, Matco Tools, Matrix, Maxcom, Maxfone, Maximus, Maxtron, MAXVI, Maxwest, MAXX, Maze, Maze Speed, MBI, MBOX, MDC Store, MDTV, meanIT, Mecer, Mecool, Mediacom, MediaTek, Medion, MEEG, MegaFon, Meitu, Meizu, Melrose, Memup, Meta, Metz, MEU, MicroMax, Microsoft, Microtech, Minix, Mint, Mintt, Mio, Mione, Miray, Mito, Mitsubishi, Mitsui, MIVO, MIWANG, MIXC, MiXzo, MLAB, MLLED, MLS, MMI, Mobell, Mobicel, MobiIoT, Mobiistar, Mobile Kingdom, Mobiola, Mobistel, MobiWire, Mobo, Mobvoi, Modecom, Mofut, Mosimosi, Motiv, Motorola, Movic, MOVISUN, Movitel, Moxee, mPhone, Mpman, MSI, MStar, MTC, MTN, Multilaser, MultiPOS, MwalimuPlus, MYFON, MyGica, MygPad, Mymaga, MyMobile, MyPhone, Myria, Myros, Mystery, MyTab, MyWigo, Nabi, Nanho, Naomi Phone, NASCO, National, Navcity, Navitech, Navitel, Navon, NavRoad, NEC, Necnot, Nedaphone, Neffos, NEKO, Neo, neoCore, Neolix, Neomi, Neon IQ, Netgear, Netmak, NeuImage, NeuTab, New Balance, New Bridge, Newgen, Newland, Newman, Newsday, NewsMy, Nexa, NEXBOX, Nexian, NEXON, NEXT, Nextbit, NextBook, NextTab, NG Optics, NGM, NGpon, Nikon, NINETEC, Nintendo, nJoy, NOA, Noain, Nobby, Noblex, NOBUX, noDROPOUT, NOGA, Nokia, Nomi, Nomu, Noontec, Nordmende, NORMANDE, NorthTech, Nos, Nothing Phone, Nous, Novex, Novey, NOVO, NTT West, NuAns, Nubia, NUU Mobile, NuVision, Nuvo, Nvidia, NYX Mobile, O+, O2, Oale, Oangcc, OASYS, Obabox, Ober, Obi, Odotpad, Odys, OINOM, Ok, Okapia, Oking, OKSI, OKWU, Olax, Olkya, Ollee, OLTO, Olympia, OMIX, Onda, OneClick, OneLern, OnePlus, Onix, Onkyo, ONN, ONVO, ONYX BOOX, Ookee, OpelMobile, Openbox, Ophone, OPPO, Opsson, Optoma, Orange, Orbic, Orbita, Orbsmart, Ordissimo, Orion, OSCAL, OTTO, OUJIA, Ouki, Oukitel, OUYA, Overmax, Ovvi, Owwo, OYSIN, Oysters, Oyyu, OzoneHD, P-UP, Packard Bell, Paladin, Palm, Panacom, Panasonic, Pano, Panoramic, Pantech, PAPYRE, Parrot Mobile, Partner Mobile, PC Smart, PCBOX, PCD, PCD Argentina, PEAQ, Pelitt, Pendoo, Penta, Pentagram, Perfeo, Phicomm, Philco, Philips, Phonemax, phoneOne, Pico, PINE, Pioneer, Pioneer Computers, PiPO, PIRANHA, Pixela, Pixelphone, Pixus, Planet Computers, Platoon, Ployer, Plum, PlusStyle, Pluzz, PocketBook, POCO, Point Mobile, Point of View, Polar, PolarLine, Polaroid, Polestar, PolyPad, Polytron, Pomp, Poppox, POPTEL, Porsche, Positivo, Positivo BGH, PPTV, Premier, Premio, Prestigio, PRIME, Primepad, Primux, Pritom, Prixton, PROFiLO, Proline, Prology, ProScan, Protruly, ProVision, PULID, Punos, Purism, Q-Box, Q-Touch, Q.Bell, QFX, Qilive, QLink, QMobile, Qnet Mobile, QTECH, Qtek, Quantum, Quatro, Qubo, Quechua, Quest, Quipus, Qumo, Qware, R-TV, Rakuten, Ramos, Raspberry, Ravoz, Raylandz, Razer, RCA Tablets, Reach, Readboy, Realme, RED, Redbean, Redfox, RedLine, Redway, Reeder, REGAL, RelNAT, Remdun, Retroid Pocket, Revo, Revomovil, Ricoh, Rikomagic, RIM, Rinno, Ritmix, Ritzviva, Riviera, Rivo, Rizzen, ROADMAX, Roadrover, Roam Cat, ROiK, Rokit, Roku, Rombica, Ross&Moor, Rover, RoverPad, Royole, RoyQueen, RT Project, RugGear, RuggeTech, Ruggex, Ruio, Runbo, Rupa, Ryte, S-TELL, S2Tel, Saba, Safaricom, Sagem, Saiet, Salora, Samsung, Samtech, Samtron, Sanei, Sankey, Sansui, Santin, SANY, Sanyo, Savio, Sber, SCBC, Schneider, Schok, Scosmos, Seatel, SEBBE, Seeken, SEEWO, SEG, Sega, Selecline, Selenga, Selevision, Selfix, SEMP TCL, Sencor, Sendo, Senkatel, Senseit, Senwa, Seuic, Sewoo, SFR, SGIN, Shanling, Sharp, Shift Phones, Shivaki, Shtrikh-M, Shuttle, Sico, Siemens, Sigma, Silelis, Silent Circle, Simbans, simfer, Simply, Singtech, Siragon, Sirin Labs, SK Broadband, SKG, SKK Mobile, Sky, Skyline, SkyStream, Skyworth, Smadl, Smailo, Smart, Smart Electronic, Smart Kassel, Smartab, SmartBook, SMARTEC, Smartex, Smartfren, Smartisan, Smarty, Smooth Mobile, Smotreshka, SNAMI, SobieTech, Soda, Softbank, Soho Style, SOLE, SOLO, Solone, Sonim, SONOS, Sony, SOSH, Soundmax, Soyes, Spark, Sparx, SPC, Spectralink, Spectrum, Spice, Sprint, SPURT, SQOOL, SSKY, Star, Starlight, Starmobile, Starway, Starwind, STF Mobile, STG Telecom, STK, Stonex, Storex, StrawBerry, Stream, STRONG, Stylo, Subor, Sugar, Sumvision, Sunmax, Sunmi, Sunny, Sunstech, SunVan, Sunvell, SUNWIND, SuperBOX, SuperSonic, SuperTab, Supra, Supraim, Surge, Suzuki, Sveon, Swipe, SWISSMOBILITY, Swisstone, Switel, SWTV, Syco, SYH, Sylvania, Symphony, Syrox, T-Mobile, T96, TAG Tech, Taiga System, Takara, Talius, Tambo, Tanix, TB Touch, TCL, TD Systems, TD Tech, TeachTouch, Technicolor, Technika, TechniSat, Technopc, TechnoTrend, TechPad, TechSmart, Techwood, Teclast, Tecno Mobile, TecToy, TEENO, Teknosa, Tele2, Telefunken, Telego, Telenor, Telia, Telit, Telma, TeloSystems, Telpo, TENPLUS, Teracube, Tesco, Tesla, TETC, Tetratab, teXet, ThL, Thomson, Thuraya, TIANYU, Tibuta, Tigers, Time2, Timovi, TIMvision, Tinai, Tinmo, TiPhone, TiVo, TJC, TOKYO, Tolino, Tone, TOOGO, Tooky, Top House, TopDevice, TOPDON, Topelotek, Toplux, TOPSHOWS, Topsion, Topway, Torex, Torque, TOSCIDO, Toshiba, Touch Plus, Touchmate, TOX, TPS, Transpeed, TrekStor, Trevi, Trident, Trifone, Trio, Tronsmart, True, True Slim, TTEC, TTK-TV, TuCEL, Tunisie Telecom, Turbo, Turbo-X, TurboKids, TurboPad, Turkcell, TVC, TWM, Twoe, TWZ, Tymes, Türk Telekom, U-Magic, U.S. Cellular, UE, UGINE, Ugoos, Uhans, Uhappy, Ulefone, Umax, UMIDIGI, Unblock Tech, Uniden, Unihertz, Unimax, Uniqcell, Uniscope, Unistrong, Unitech, UNIWA, Unknown, Unnecto, Unnion Technologies, UNNO, Unonu, Unowhy, UOOGOU, Urovo, UTime, UTOK, UTStarcom, UZ Mobile, V-Gen, V-HOME, V-HOPE, v-mobile, VAIO, VALEM, VALTECH, Vankyo, Vargo, Vastking, VAVA, VC, VDVD, Vega, Vekta, Venso, Venstar, Venturer, VEON, Verico, Verizon, Vernee, Verssed, Versus, Vertex, Vertu, Verykool, Vesta, Vestel, VETAS, Vexia, VGO TEL, ViBox, Victurio, VIDA, Videocon, Videoweb, ViewSonic, VIIPOO, Vinabox, Vinga, Vinsoc, Vios, Viper, Vipro, Virzo, Vision Touch, Visual Land, Vitelcom, Vityaz, Viumee, Vivax, VIVIMAGE, Vivo, VIWA, Vizio, Vizmo, VK Mobile, VKworld, Vodacom, Vodafone, VOGA, VOLKANO, Volt, Vonino, Vontar, Vorago, Vorcom, Vorke, Vormor, Vortex, Voto, VOX, Voxtel, Voyo, Vsmart, Vsun, VUCATIMES, Vue Micro, Vulcan, VVETIME, Völfen, WAF, Walton, Waltter, Wanmukang, WANSA, WE, Webfleet, Wecool, Weelikeit, Weimei, WellcoM, WELLINGTON, Western Digital, Westpoint, Wexler, White Mobile, Wieppo, Wigor, Wiko, Wileyfox, Winds, Wink, Winmax, Winnovo, Winstar, Wintouch, Wiseasy, WIWA, WizarPos, Wizz, Wolder, Wolfgang, Wolki, Wonu, Woo, Wortmann, Woxter, X-AGE, X-BO, X-Mobile, X-TIGI, X-View, X.Vision, X88, X96, X96Q, Xcell, XCOM, Xcruiser, XElectron, XGIMI, Xgody, Xiaodu, Xiaolajiao, Xiaomi, Xion, Xolo, Xoro, Xshitou, Xtouch, Xtratech, Xwave, XY Auto, Yandex, Yarvik, YASIN, YELLYOUTH, YEPEN, Yes, Yestel, Yezz, Yoka TV, Yooz, Yota, YOTOPT, Youin, Youwei, Ytone, Yu, YU Fly, Yuandao, YUHO, YUMKEM, YUNDOO, Yuno, YunSong, Yusun, Yxtel, Z-Kai, Zaith, Zamolxe, Zatec, Zealot, Zeblaze, Zebra, Zeeker, Zeemi, Zen, Zenek, Zentality, Zfiner, ZH&K, Zidoo, ZIFRO, Zigo, ZIK, Zinox, Ziox, Zonda, Zonko, Zoom, ZoomSmart, Zopo, ZTE, Zuum, Zync, ZYQ, Zyrex, öwn

Maintainers

Contributors

Thanks a lot to the following contributors:

Contributing

  1. Open an issue and explain your feature request or bug before writing any code (this can save a lot of time, both the contributor and the maintainers!)
  2. Fork the project (https://github.com/podigee/device_detector/fork)
  3. Create your feature branch (git checkout -b my-new-feature)
  4. Commit your changes (git commit -am 'Add some feature')
  5. Push to the branch (git push origin my-new-feature)
  6. Create a new Pull Request (compare with develop)
  7. When adding new data to the yaml files, please make sure to open a PR in the original project, as well (https://github.com/piwik/device-detector)

device_detector's People

Contributors

aried3r avatar axeleander avatar benzimmer avatar brunoarueira avatar dnswus avatar girardof avatar igor-drozdov avatar madejejej avatar matisojka avatar mkdynamic avatar n-rodriguez avatar seandilda avatar skaes avatar spiderpug avatar steverob avatar yagooar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

device_detector's Issues

browser is said to be mobile safari when using an app on an iPad

When using an app on an iOS, the browser is set correctly, however once the OS in the user agent changes to iPadOS, then the browser is set to be recognised as a mobile safari even though the app is still being used.

e.g.
<app_name>/3.7.1 (iPad; iPadOS 15.6.1; Scale/2.00)/ DeviceId/48C8426D-64B6-4961-BD3E-09FD99C3B046/ BuildNumber/1111 returns browser as "Mobile Safari" but
<app_name>/3.7.1 (iPad; iOS 15.6.1; Scale/2.00)/ DeviceId/48C8426D-64B6-4961-BD3E-09FD99C3B046/ BuildNumber/1111 returns browser as "<app_name>"

Similar thing happens with android where the browser on an android device returns "Android Browser" even though the app name is specified

At the moment I have a hack in place that checks for the app name at the beginning of the user agent string but that is just a hack and I would prefer not to make use of it for long. I'll tinker with this library if I have some time, just thought I would report this issue 🥺

Ruby warnings

Hi there!

Since release 1.0.6 I get this warning :

/cache/nicolas/concerto/ruby-master/ruby/3.0.0/gems/device_detector-1.0.6/lib/device_detector/parser.rb:88: warning: regular expression has ']' without escape
/cache/nicolas/concerto/ruby-master/ruby/3.0.0/gems/device_detector-1.0.6/lib/device_detector/parser.rb:88: warning: nested repeat operator '+' and '?' was replaced with '*' in regular expression

Thank you!

Failed device_brand method

DeviceDetector.new(Faker::Internet.user_agent).device_brand

device_detector/lib/device_detector/parser.rb:101:in `block in parse_regexes': no implicit conversion of Symbol into Integer (TypeError)

File structure is different

Concurrency issue in MemoryCache

Hi!

We're running DeviceDetector in Sidekiq and under high load we sometimes are able to get NoMethodError: undefined method '[]' for nil:NilClass from:

"/webapps/api/vendor/bundle/ruby/2.6.0/gems/device_detector-1.0.1/lib/device_detector/os.rb" line 11 in short_name
"/webapps/api/vendor/bundle/ruby/2.6.0/gems/device_detector-1.0.1/lib/device_detector.rb" line 66 in device_type

That's basically a MemoryCache#get_or_set call which returns nil.

Here's the code for reference:

def get_or_set(key, value = nil)
string_key = String(key)
if key?(string_key)
get(string_key)
else
value = yield if block_given?
set(string_key, value)
end
end

My belief what happens is:

  1. The cache is full and it will be purged on the next write
  2. Thread 1 In line 33 we check if the given key K1 exists
  3. Thread 2 in the meantime calls cache.set('k2', 1) and purges the cache. K1 was an old key and got purged
  4. Thread 1 tries to get(K1) and returns, but there is no such key now so it returns nil

Here's a script that can replicate it:

require 'device_detector'

cache = DeviceDetector::MemoryCache.new(max_cache_keys: 3)

# fill the cache 100% capacity
cache.set(1, 1)
cache.set(2, 2)
cache.set(3, 3)

# now on, the oldest keys should be purged on each write

sampler = (1..4).to_a

threads = 20.times.map do |thread_id|
  Thread.new do
    1_000_000.times do |i|
      val = sampler.sample

      ret = cache.get_or_set(val, val)

      puts "[Thread #{thread_id}] BOOM" if ret.nil?
    end
  end
end

threads.each(&:join)

A simple solution would be to remove the check key?(string_key) and just get the value and return it if it's non-nil.

[safely] incompatible encoding regexp match (UTF-8 regexp with ASCII-8BIT string)

/gems/device_detector-1.1.0/lib/device_detector/device.rb:1560 in block in regex_find
/gems/device_detector-1.1.0/lib/device_detector/device.rb:1560 in each
/gems/device_detector-1.1.0/lib/device_detector/device.rb:1560 in find
/gems/device_detector-1.1.0/lib/device_detector/device.rb:1560 in regex_find
/gems/device_detector-1.1.0/lib/device_detector/device.rb:1535 in block in matching_regex
/gems/device_detector-1.1.0/lib/device_detector/parser.rb:92 in block in from_cache
/gems/device_detector-1.1.0/lib/device_detector/memory_cache.rb:38 in get_or_set
/gems/device_detector-1.1.0/lib/device_detector/parser.rb:92 in from_cache
/gems/device_detector-1.1.0/lib/device_detector/device.rb:1531 in matching_regex
/gems/device_detector-1.1.0/lib/device_detector/parser.rb:31 in regex_meta
/gems/device_detector-1.1.0/lib/device_detector/device.rb:1505 in type
/gems/device_detector-1.1.0/lib/device_detector.rb:67 in device_type
/gems/ahoy_matey-4.1.0/lib/ahoy/base_store.rb:59 in bot?
/gems/ahoy_matey-4.1.0/lib/ahoy/base_store.rb:39 in exclude?
/gems/ahoy_matey-4.1.0/lib/ahoy/tracker.rb:189 in exclude?
/gems/ahoy_matey-4.1.0/lib/ahoy/tracker.rb:20 in track
app/controllers/application_controller.rb:14 in track_action
12:
    properties[:method] = request.method
13:
14:
    ahoy.track request.fullpath, properties
15:
  end
16:
end

device_type is nil for UserAgent from Wechat Brower

the user agent like

"Mozilla/5.0 (Linux; Android 5.1; MX5 Build/LMY47I; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.49 Mobile MQQBrowser/6.2 TBS/043015 Safari/537.36 MicroMessenger/6.5.3.980 NetType/4G Language/zh_CN"

and the device_type is nil

Android 9 user agents get nil as os_full_version

Now that android 9 is live, the user agents we get from those devices look something like this:

Mozilla/5.0 (Linux; Android 9; Pixel 2 XL Build/PPP3.180510.008; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/67.0.3396.87 Mobile Safari/537.36
                            ^
                            This is where we should see something like 9.0 instead

(as seen here)

Because the regexp for android devices expects a version number like
(\d+[\.\d]+) The lone 9 is just not picked up.

You can reproduce it like this:

dd = DeviceDetector.new "Mozilla/5.0 (Linux; Android 9; Pixel 2 Build/PPR1.180610.009) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Mobile Safari/537.36"
dd.os_full_version # => nil

Use RuboCop?

Hi @spiderpug,

Thanks for maintaining this so far!
However, there are a bunch of things that could be fixed according to the Ruby style guide.

Would you consider using RuboCop?
I would be happy to raise a PR if so :)

warnings on Readme's user agent sample

I was trying out your gem with the user agent from Readme which is:
Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.17 Safari/537.36.

However when I tried to get device_name, it returned nil along with these warnings:

/Users/victor/.rvm/gems/ruby-2.2.1/gems/device_detector-0.9.0/lib/device_detector/parser.rb:74: warning: character class has '-' without escape
/Users/victor/.rvm/gems/ruby-2.2.1/gems/device_detector-0.9.0/lib/device_detector/parser.rb:74: warning: nested repeat operator '+' and '?' was replaced with '*' in regular expression
/Users/victor/.rvm/gems/ruby-2.2.1/gems/device_detector-0.9.0/lib/device_detector/parser.rb:74: warning: nested repeat operator '+' and '?' was replaced with '*' in regular expression
/Users/victor/.rvm/gems/ruby-2.2.1/gems/device_detector-0.9.0/lib/device_detector/device.rb:53: warning: nested repeat operator '+' and '?' was replaced with '*' in regular expression
=> nil

Is this a bug for ruby 2.2.1?

Old Ubuntu user agent parsing seems incorrect

Obvious from looking at oss.yml why this is so, but I have what I believe to be a legitimate user agent string from an old version of Ubuntu that is failing the following test:

def test_ubuntu_10_device_detector
  agent_string = 'Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Ubuntu/10.10 Chromium/10.0.648.133 Chrome/10.0.648.133 Safari/534.16'

  uap = UserAgentParser::Parser.new.parse(agent_string)
  assert_equal 'Ubuntu 10.10', uap.os.to_s # UAP seemingly has rules to match this

  dd = DeviceDetector.new(agent_string)
  assert_equal 'Ubuntu', dd.os_name
end

Test output:

  1) Failure:
ImprovedUserAgentTest#test_ubuntu_10_device_detector [test/models/user_agent_test.rb:15]:
Expected: "Ubuntu"
  Actual: "$1"

Introduce a separate cache for the regexp definitions not to expire them with results

While using the DeviceDetector gem I've noticed, that the same cache is being used to store the final detection results as well as to tackle the internal caching.

This approach causes a YAML reload of regexps when enough browsers are being recognized.

Here's an example of how to reproduce that:

require 'device_detector'

DeviceDetector.configure do |config|
  config.max_cache_keys = 10
end

module Bench
  def self.call
    t = Time.now.to_f
    r = yield
    p (Time.now.to_f-t)*1000
    r
  end
end

20.times do
  Bench.call { DeviceDetector.new(Time.now.to_f.to_s).full_version }
end

the result is:

16.92676544189453
0.14138221740722656
0.1392364501953125
0.1327991485595703
0.13113021850585938
28.29146385192871
0.7753372192382812
0.11897087097167969
0.11181831359863281
45.581817626953125
1.2042522430419922
1.0809898376464844
1.1005401611328125
17.076730728149414
0.12612342834472656
0.11444091796875
0.10657310485839844
27.06766128540039
0.13065338134765625
0.1087188720703125

So we see spikes in the time needed due to reloading of yaml definitions.

After applying the following patch:

module Patches
  module DeviceDetectorParser
    CACHE = ::DeviceDetector::MemoryCache.new({})

    private_constant :CACHE

    def regexes_for(file_paths)
      CACHE.get_or_set(filepaths) do
        super
      end
    end
  end
end

DeviceDetector::Parser.prepend(Patches::DeviceDetectorParser)

the results are always consistent as only the "public" results are being purged while keeping the regexp definitions intact in the cache.

require 'device_detector'

DeviceDetector.configure do |config|
  config.max_cache_keys = 10
end

module Patches
  module DeviceDetectorParser
    CACHE = ::DeviceDetector::MemoryCache.new({})

    private_constant :CACHE

    def regexes_for(file_paths)
      CACHE.get_or_set(filepaths) do
        super
      end
    end
  end
end

DeviceDetector::Parser.prepend(Patches::DeviceDetectorParser)

module Bench
  def self.call
    t = Time.now.to_f
    r = yield
    p (Time.now.to_f-t)*1000
    r
  end
end

20.times do
  Bench.call { DeviceDetector.new(Time.now.to_f.to_s).full_version }
end

Result:

19.721269607543945
1.1222362518310547
0.8854866027832031
0.1773834228515625
0.1361370086669922
0.1354217529296875
0.1327991485595703
0.13184547424316406
0.1277923583984375
0.13184547424316406
0.12993812561035156
0.1289844512939453
0.13017654418945312
0.13184547424316406
0.12826919555664062
0.13208389282226562
0.13065338134765625
0.12731552124023438
0.12969970703125
0.13637542724609375

if that approach is ok, I can make a PR.

[Small Bug] DeviceDetector::full_version is returning platform version for Client Hints

Encountered a small bug while playing around with user agent client hints. (should be a one-line change)

The full_version method in DeviceDetector is calling client_hint.platform_version, which is the property used to get the os version.

It should be client_hint.full_version instead. This is the browser version. (the one that read from the Sec-CH-UA-Full-Version header)

Let me know if you need more information!

Upstream patterns can't be updated due to Ruby Regex error

When updating to latest upstream regexes tests are failing for a string with special charater, eg:

6) Error:
DeviceDetector::smartphone-7.yml::Mozilla/5.0 (Linux; U; Android 2.3.6; pt-br; XT321 Build/GRK39F) AppleWebKit/533.1 (KHTML, like Gecko) Versão/4.0 Mobile Safari/533.1#test_0001_should be detected:
RegexpError: invalid pattern in look-behind: /(?:^|[^A-Z0-9\-_]|[^A-Z0-9\-]_|sprd-)(?:acer|(?<!ZTE BLADE |ImSmart |ERGO |X-Style Tab )a(?:101|110|2[10]0|211|50[10]|51[10]|70[10])[);\/ ]|Android.*V3[67]0[);\/ ]|Android.*Z1[23456]0 Build|Android.*Z5\d{2} Build|Android.*T0[234678] Build|Android.*S55[);\/ ]|A1-830|A1-81[01]|A1-7[23]4|A3-A[1234][01]|B1-7[1235678][01]|B1-7[23]3|B1-8[1235]0|B1-A71|B3-A[12]0|B3-A3[02]|E39[);\/ ]|S5[12]0 Build|DA[0-9]+HQ?L[);\/ ]|Aspire V5-121|Predator G9-793|GT-810)/i

Source regexp that is causing the issue:
https://github.com/matomo-org/device-detector/blob/118651c4fbff739e7f29acebd1732e7ccbf238a7/regexes/device/mobiles.yml#L735

This seems to be related to a bug in Ruby Regexp
https://bugs.ruby-lang.org/issues/13671

Until the problem is fixed a workaround needs to be implemented. One quick option would be to fail silently when this happens, but that's obviously not a good solution. Any ideas?

Unable to detect Firefox Android

Hello,

I have the following user agent : "Mozilla/5.0 (Android 7.1.2; Mobile; rv:55.0.2) Gecko/55.0.2 Firefox/55.0.2"

It can't detect that I am using a smartphone but it detect that I'm using Android..

device = DeviceDetector.new("Mozilla/5.0 (Android 7.1.2; Mobile; rv:55.0.2) Gecko/55.0.2 Firefox/55.0.2")
device.device_type
=> nil
device.os_name
=> "Android"

Encoding::CompatibilityError caused by "é" in User-Agent

Hi! I've encountered Encoding::CompatibilityError in my project caused by non-standard characters in a custom User-Agent.

Environment: Ruby 3.2.0, DeviceDetector 1.1.0.
Environment: Ruby 3.0.2, DeviceDetector 1.1.0.

User's agent is Mon User-Agent personnalisé.

The error:
Encoding::CompatibilityError (incompatible encoding regexp match (UTF-8 regexp with ASCII-8BIT string))

It seems to be caused by user_agent =~ r[:regex] in device.rb's regex_find

regex_list.find { |r| user_agent =~ r[:regex] }

I see that it already rescues RegexpError. I was wondering if Encoding::CompatibilityError stands to be rescued here as well. I've forked the gem and made the change for my project and it no longer raises an error with this User-Agent, removing the last char instead.

Any thoughts on this?

Trace:

device_detector (1.1.0) lib/device_detector/device.rb in each at line 1560
device_detector (1.1.0) lib/device_detector/device.rb in find at line 1560
device_detector (1.1.0) lib/device_detector/device.rb in regex_find at line 1560
device_detector (1.1.0) lib/device_detector/device.rb in block in matching_regex at line 1535
device_detector (1.1.0) lib/device_detector/parser.rb in block in from_cache at line 92
device_detector (1.1.0) lib/device_detector/memory_cache.rb in get_or_set at line 38
device_detector (1.1.0) lib/device_detector/parser.rb in from_cache at line 92
device_detector (1.1.0) lib/device_detector/device.rb in matching_regex at line 1531
device_detector (1.1.0) lib/device_detector/parser.rb in regex_meta at line 31
device_detector (1.1.0) lib/device_detector/device.rb in type at line 1505
device_detector (1.1.0) lib/device_detector.rb in device_type at line 67

Fails to identify device from user_agent string

Device_name returns nil for user_agent string
'Mozilla/5.0 (Linux; Android 5.1.1; ONE E1003 Build/LMY47V) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.95 Mobile Safari/537.36'

but returns proper OS info:

> c = DeviceDetector.new 'Mozilla/5.0 (Linux; Android 5.1.1; ONE E1003 Build/LMY47V) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.95 Mobile Safari/537.36'
> c.device_name
=> nil
> c.device_brand
=> nil
> c.os_name
=> "Android"
> c.os_full_version
=> "5.1.1"

Usage from README.md doesn't work

This gem seems so promising!

I looked into this for a few minutes, but couldn't determine the problem. Here's what I ran in irb:

2.1.5 :001 > require 'device_detector'
 => true 
2.1.5 :002 > user_agent = 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.17 Safari/537.36'
 => "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.17 Safari/537.36" 
2.1.5 :003 > client = DeviceDetector.new(user_agent)
 => #<DeviceDetector:0x007fab345a3b10 @user_agent="Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.17 Safari/537.36"> 
2.1.5 :004 > client.name
 => "Chrome" 
2.1.5 :005 > client.full_version
 => "30.0.1599.17" 
2.1.5 :006 > client.os_name
 => "Windows" 
2.1.5 :007 > client.os_full_version
 => "8" 
2.1.5 :008 > client.device_name
 => "OW64" 
2.1.5 :009 > client.device_type
 => "tv" 

Update to the latest regex of original Piwik

Hi, first thanks for this wonderful and powerful gem.

We run into an issue that took a long time to understand.

Actually we found out that the reason our app has wrong behavior is sue to device detector gem.
Indeed on UC browsers, the original Piwik fixed the issue in order not to output "Chrome" but UC Browser a major browser (in Asia notably).
See matomo-org/device-detector#5617

But in our tests on various UC Browsers, for example on the user agent below, the original piwik after their fix now righfully output client name =uc browser, but ruby device Detector Gem still wrongly output "Chrome"

User agent example
Mozilla/5.0 (Linux; U; Android 4.2.2;en-US;Darkmoon Build Build/JDQ39) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.108 UCBrowser/12.0.0.1088 Mobile Safari/537.36

I think it's due to the fact the folder regexes was last updated 11 months ago but the fix in the piwik yaml regexes was done in may 2017, which is before those 11 months.

Is is easy to fix ?

Thanks
M.

Last regexes and fixtures for device-detector, tests not passing

Hello, due to the number of changes in the device-detector original library, even if I run the rake tasks for updating the YAML files, the tests do not pass.

I have seen that some fixes have been added to the library so that is presumably the reason why the tests do not pass. I tried to change some results expected as "" but returned as nil and vice versa, but I could not get all the tests passed, so I think the best would be to start adding those fixes to this Ruby implementation of the library.

I am willing to contribute, I will start adding some pull requests.

Thanks and congratulations for the excellent library.

Benchmarks need a little clarification and maybe a feature request

Please correct me if I'm wrong... The actual parsing of the UA string does not take place until a specific component is requested. At that point only that specific component is extracted from the UA string. So other user agent parsers which extract all components at once will show up slower in your benchmarks.

I can see where your JIT parser approach comes in handy when only one or two components are used within an application. it would be interesting to see how your approach actually compares to a full parse of all components. For example Useragent now supports a #to_h method which provides a nicely structured representation of all of the components of the UA string.

If DeviceDetector had a #to_h feature that did the same thing, how would your regex approach compare benchmark-wise against UserAgent ?

I can see how a #to_h feature may be outside the scope for which DeviceDetector is best suited.

Dewayne
o-*

Getting brand name for mobiles

How to detect brand name for mobile? There has a device_name field but mostly it shows only the device model and can't detect phone brands such as Samsung, Mi etc...

Outdated regexes

Is this library still being maintained? The last PR to update regexes was in 2020 and it was still not merged.

Any active forks?

nil user-agent string causes raise in 1.1.0

In device_detector 1.0.7

DeviceDector.new(nil).device_name # => nil

In device_detector 1.1.0

 DeviceDector.new(nil).device_name 

raises

gems/device_detector-1.1.0/lib/device_detector.rb:221:in fix_for_x_music': undefined method include?' for nil:NilClass (NoMethodError)

This seems like maybe an unintended backwards incompatible change, that may break some dependents that aren't prepared for it?

The easy workaround seems to be to make sure you never pass nil to DeviceDector.new; passing an empty string is fine, so DeviceDector.new(str_var || "") might be the way to go.

But perhaps DeviceDetector should handle this itself?

Apple Podcasts (app) detected as "Mobile Safari"

irb(main):040:0> s = 'AppleCoreMedia/1.0.0.10B500 (iPod; U; CPU OS 6_1_6 like Mac OS X; en_gb)'
=> "AppleCoreMedia/1.0.0.10B500 (iPod; U; CPU OS 6_1_6 like Mac OS X; en_gb)"
irb(main):041:0> DeviceDetector.new(s).name
=> "Mobile Safari"

When using Chrome on a MacBook - returned info is incorrect

So when running in development, (have not tried it in prod as of yet), When I capture the client data in my password reset controller, info is returning as incorrect? this is how I have implemented the call (it will be refactored later).

  def create
    user_agent = 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.17 Safari/537.36'
    client = DeviceDetector.new(user_agent)
    @user = User.find_by(email: params[:password_reset][:email].downcase)
    if @user
      @user.create_reset_digest
      PasswordResetDetail.create(
        user_id: @user.id,
        client_name: client.name,
        client_full_version: client.full_version,
        client_os_name: client.os_name,
        client_os_full_version: client.os_full_version,
        client_device_name: client.device_name,
        client_device_type: client.device_type,
        client_is_known: client.known?
      )
      UserMailer.password_reset(@user).deliver_now
      flash[:info] = 'Email sent with password reset instructions'
      redirect_to community_root_url(subdomain: 'community')
    else
      flash.now[:error] = 'Email address not found'
      render 'new'
    end
  end

This is the server output (no errors and aside from the wrong info it works very well!)

Started POST "/password_resets" for 127.0.0.1 at 2020-09-08 16:58:22 -0600
Processing by PasswordResetsController#create as HTML
  Parameters: {"authenticity_token"=>"JAJSpUbqzRKIS/nJ3QO+TFhh8stBF0BzRHdiaDHHpKizKLoAVEY8BhfIRfFlj4o4l6GDbJn4fFVmjOc+/bXWTw==", "password_reset"=>"[FILTERED]"}
  User Load (0.4ms)  SELECT "users".* FROM "users" WHERE "users"."email" = $1 LIMIT $2  [["email", "[email protected]"], ["LIMIT", 1]]
  ↳ app/controllers/password_resets_controller.rb:11:in `create'
   (0.2ms)  BEGIN
  ↳ app/models/user.rb:53:in `create_reset_digest'
  User Update (0.4ms)  UPDATE "users" SET "reset_digest" = $1, "updated_at" = $2 WHERE "users"."id" = $3  [["reset_digest", "$2a$12$z9FXWm6sgdYkwCUfhq5ntunOg5yEBFuCdQ8Cd1mUZ44xD5yHI1R9C"], ["updated_at", "2020-09-08 22:58:22.658982"], ["id", 1]]
  ↳ app/models/user.rb:53:in `create_reset_digest'
   (0.8ms)  COMMIT
  ↳ app/models/user.rb:53:in `create_reset_digest'
   (0.1ms)  BEGIN
  ↳ app/models/user.rb:54:in `create_reset_digest'
  User Update (0.5ms)  UPDATE "users" SET "updated_at" = $1, "reset_sent_at" = $2 WHERE "users"."id" = $3  [["updated_at", "2020-09-08 22:58:22.663686"], ["reset_sent_at", "2020-09-08 22:58:22.663494"], ["id", 1]]
  ↳ app/models/user.rb:54:in `create_reset_digest'
   (0.4ms)  COMMIT
  ↳ app/models/user.rb:54:in `create_reset_digest'
   (0.2ms)  BEGIN
  ↳ app/controllers/password_resets_controller.rb:14:in `create'
  User Load (0.4ms)  SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2  [["id", 1], ["LIMIT", 1]]
  ↳ app/controllers/password_resets_controller.rb:14:in `create'
  PasswordResetDetail Create (0.4ms)  INSERT INTO "password_reset_details" ("user_id", "client_name", "client_full_version", "client_os_name", "client_os_full_version", "client_device_type", "client_is_known", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id"  [["user_id", 1], ["client_name", "Chrome"], ["client_full_version", "30.0.1599.17"], ["client_os_name", "Windows"], ["client_os_full_version", "8"], ["client_device_type", "desktop"], ["client_is_known", true], ["created_at", "2020-09-08 22:58:22.671077"], ["updated_at", "2020-09-08 22:58:22.671077"]]
  ↳ app/controllers/password_resets_controller.rb:14:in `create'
   (0.4ms)  COMMIT
  ↳ app/controllers/password_resets_controller.rb:14:in `create'
  PasswordResetDetail Load (0.5ms)  SELECT "password_reset_details".* FROM "password_reset_details" WHERE "password_reset_details"."user_id" = $1 ORDER BY "password_reset_details"."id" DESC LIMIT $2  [["user_id", 1], ["LIMIT", 1]]
  ↳ app/mailers/user_mailer.rb:31:in `password_reset'
  CACHE PasswordResetDetail Load (0.1ms)  SELECT "password_reset_details".* FROM "password_reset_details" WHERE "password_reset_details"."user_id" = $1 ORDER BY "password_reset_details"."id" DESC LIMIT $2  [["user_id", 1], ["LIMIT", 1]]
  ↳ app/mailers/user_mailer.rb:32:in `password_reset'
UserMailer#password_reset: processed outbound mail in 4.8ms
Breadcrumb ActionMail delivered meta_data from:Mail::AddressContainer has been dropped for having an invalid data type
Breadcrumb ActionMail delivered meta_data date:DateTime has been dropped for having an invalid data type
Delivered mail [email protected] (381.5ms)
Date: Tue, 08 Sep 2020 16:58:22 -0600
From: [email protected]
Reply-To: [email protected]
To: [email protected]
Message-ID: <[email protected]>
Subject: Postmark Template: "user-password-reset"
Mime-Version: 1.0
Content-Type: text/plain;
 charset=UTF-8
Content-Transfer-Encoding: 7bit
postmark-template-alias: user-password-reset

This message is using a Postmark template.

Alias: "user-password-reset"
Model:
{
  "name": "xxxx",
  "action_url": "http://community.lvh.me:3000/password_resets/0sScCHal3P7Zu_1xHfJWdA/edit?email=xxx%xxx-xxx-xxx.com",
  "device_name": "Desktop",
  "operating_system": "Windows",
  "support_url": "[email protected]"
}

Use the #prerender method on this object to contact the Postmark API to pre-render the template.

Cheers,
Your friends at Postmark
Redirected to http://community.lvh.me:3000/
Completed 302 Found in 684ms (ActiveRecord: 4.8ms | Allocations: 15911)

]

I am currently running a macbook pro, with macOS Catalina (v10.15.6)

Is my implementation buggered up or am I doing something wrong?

Is this gem still maintained?

I see that regexes from original repository has been imported last time at 2022-02-17 (8 months ago at a time when I'm writing this) so I'd like to ask if this gem is still maintained by author and if updates can be expected in future?

Weird OS Parsing

When parsing a user_agent for Chrome on Mac OSX 10.10.2, the os_full_version is returned as 10_10_2 instead of 10.10.2

open os family method

Hi, @peteygao

Great gem, I want to replace user_agent.

But I face a small problem now, I want to get os.family and find it private.

Do you have plan to open the information? Thank you very much.

What do people use for a hosting network detector?

I'm wondering what people use for detecting hosting networks or networks likely to have bots? I see that Amazon advertise their IP address ranges via JSON. Would there be an interest in adding that functionality to this gem? Provided we could find enough network ranges that is.

Parsing user_agent for symbian os

Hello, i created issue in original library here
It looks, that device_detector on this user agent string returns nil

Mozilla/4.0 (compatible; MSIE 6.0; Symbian OS; Series 60/03.83; 9730) Opera 8.65 [ru]

Are you really sure, that regexpes in device_detector gem is really new?

Shutdown cache

Hi,

We are encountering an issue that some requests are hanging or even timing out, and our thought is that it has to do with our high load and the device_detector library as it always happens before our first db call which only has the device detection before it. and then specifically caused by the Mutex locking.

Our servers are running with puma and concurrency. but more important, none of the user agents in the time frame of 5000 cached keys is expected to be equal or very little ones.

Is setting the cache amount to 0 enough? or will this break the caching option?

what do you suggest/think?

Kind regards,
Stephan

warning: nested repeat operator '+' and '?' was replaced with '*' in regular expression

Hi! This gem is currently being used as a dependency, and I noticed a gem specific warning that pops up when device_detector is initialized.

Specifically:
warning: nested repeat operator '+' and '?' was replaced with '*' in regular expression AND
regular expression has ']' without escape

It looks like the issue is stemming from this file on line 88.

I don't know a ton about Regexp and would probably have a difficult time trying to solve this.

Thanks!

.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/device_detector-1.0.6/lib/device_detector/parser.rb:88: warning: regular expression has ']' without escape
/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/device_detector-1.0.6/lib/device_detector/parser.rb:88: warning: nested repeat operator '+' and '?' was replaced with '*' in regular expression
/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/device_detector-1.0.6/lib/device_detector/parser.rb:88: warning: nested repeat operator '+' and '?' was replaced with '*' in regular expression
/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/device_detector-1.0.6/lib/device_detector/parser.rb:88: warning: nested repeat operator '+' and '?' was replaced with '*' in regular expression
/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/device_detector-1.0.6/lib/device_detector/parser.rb:88: warning: nested repeat operator '+' and '?' was replaced with '*' in regular expression
/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/device_detector-1.0.6/lib/device_detector/parser.rb:88: warning: nested repeat operator '+' and '?' was replaced with '*' in regular expression
/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/device_detector-1.0.6/lib/device_detector/parser.rb:88: warning: nested repeat operator '+' and '?' was replaced with '*' in regular expression
/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/device_detector-1.0.6/lib/device_detector/parser.rb:88: warning: nested repeat operator '+' and '?' was replaced with '*' in regular expression
/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/device_detector-1.0.6/lib/device_detector/parser.rb:88: warning: nested repeat operator '+' and '?' was replaced with '*' in regular expression

Unable to detect Firefox android device_type and newly launched devices

user_agent = 'Mozilla/5.0 (Android:9; Mobile; rv:67) Gecko/67.0 Firefox/67.0'
=> "Mozilla/5.0 (Android:9; Mobile; rv:67) Gecko/67.0 Firefox/67.0"
client = DeviceDetector.new(user_agent)
=> #<DeviceDetector:0x007fd28ab04d20 @user_agent="Mozilla/5.0 (Android:9; Mobile; rv:67) Gecko/67.0 Firefox/67.0">
[14] pry(main)> client.os_name
=> "Android"
pry(main)> client.name
=> "Firefox Mobile"
[15] pry(main)> client.device_type
=> nil
pry(main)> client.device_name
=> nil

Old TV not recognised

This user agent OS and device name is not recognised

SAMSUNG-GT-E2152/E2152XXJK2 NetFront/3.5 Profile/MIDP-2.0 Configuration/CLDC-1.1

No git tags?

Hi there! It would be nice to have git tags matching with gem releases. Thank you!

Tests not passing after updating regexes and fixtures

Hello, I have just run the tasks for updating regexes and fixtures in order to fix some user agents not recognising the device type. This is now fixed, the device type is recognised as expected, however, the rests are failing.

I would like to get my hands on them and fix them, but I was wondering if that's the right way or you usually follow other approach.

Thanks.

Benchmark in the Readme is outdated

I've ran benchmark from the Readme on my set of real user agents (160k) and it seems that the browser gem is much faster. I didn't compare precision of both though.

Could you compare them with your dataset again?

                      user     system      total        real
device_detector   4.713362   0.000000   4.713362 (  4.714573)
browser           1.780024   0.000000   1.780024 (  1.780048)

Android User Agent requires semicolons when others do not

curious why android_tablet_fragment? and android_mobile_fragment? require semicolons and other operating systems (Opera) do not? We don't use semicolons in our user agent at Kickstarter, and as far as I can tell there is no standardization here (please correct me if I'm wrong). Another example user agent from Facebook has a semicolon after Android but not after Mobile:

Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/43.0.2357.121 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/35.0.0.48.273;]

going to open a pr making the semicolon optional.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.