Mojo Identify Device

From WebOS Internals
Revision as of 00:22, 7 November 2009 by Rboatright (talk | contribs) (create)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

To tell if you are running on a Pre or a Pixie or some other future WebOS device use this call:


Mojo.Environment.DeviceInfo

It should give you back an object something along the lines of this:

{ "modelName": "Pr?", 
"platformVersion": "1.0.2", 
"carrierName": "Sprint", 
"serialNumber": "Unknown", 
"screenWidth": 320, 
"screenHeight": 480, 
"minimumCardWidth": 320, 
"minimumCardHeight": 188, 
"maximumCardWidth": 320, 
"maximumCardHeight": 424, 
"keyboardAvailable": true, 
"keyboardSlider": true, 
"keyboardType": "QWERTY", 
"wifiAvailable": true, 
"bluetoothAvailable": true }