Jump to content

Mobile Device Detection

From mediawiki.org

Proposed Datamodel

[edit]
  • ID (PK)
  • DATE / TIMESTAMP
  • USER_AGENT (VARCHAR 4096) but with a pretty high max as user agent strings are freeform and contain a lot stuff)
  • FEATURES, as <key=value> pairs separated by a comma, maybe as TEXT so we can arbitrarily add more features in the future without ALTER TABLE statements. Maybe we should store is in JSON format.
  • IP Address (maybe), strictly not necessary but could be nice to track adoption of new devices and see what devices are where popular (also as a workaround for the HTTPS issues that are making it hard to do geocoding)
  • X-WAP-PROFILE headers, in particular 4 headers are currently used:
    • x-wap-profile
    • Profile
    • wap-profile
    • X-Wap-Profile-Diff
  • Other potentially useful X-headers include:
    • x-h3g-network-quality
    • x-roaming
    • x-h3g-device-name

Maybe we want to capture all X-headers as they are so random and it is hard to predict which ones are useful.

Mobile Device Features to Detect

[edit]
  • Screen
    • Height
    • Width
    • Available Height
    • Available Width
    • Color Depth
    • Pixel Depth
  • HTML5
    • Audio
    • Video
    • Local Storage
    • AJAX
      • AJAX xhr type
      • Manipulate DOM
      • Manipulate CSS
      • Support events
  • Misc
    • Cookie support
    • File upload
    • Javascript Support
    • Vendor (navigator.vendor)
    • Platform (navigator.platform)

Mobile Device Features Not Possible to Detect

[edit]
  • Probably Media could be another section, separate from HTML5, with audio, video, graphics.
  • Java/J2ME version
  • Version of JS and CSS
  • External storage, Phones typically have a maximum size of SD card, if they support external storage.
  • Processor, speed and internal memory
  • WML
  • 2G, 2.5G, 3G, HSDPA, 4G

Implementation

[edit]

We might want to use (a subset) of modernizr.js