Skip to content

Instantly share code, notes, and snippets.

@otger
Last active December 25, 2015 11:19
Show Gist options
  • Save otger/6967774 to your computer and use it in GitHub Desktop.
Save otger/6967774 to your computer and use it in GitHub Desktop.
Code for "Determining if a device is a tablet on Titanium Appcelerator" blog post: http://www.libtronics.com/2013/10/determining-if-device-is-tablet-on.html
//considering tablet to have one dimension over 900px - this is imperfect, so you should feel free to decide
//yourself what you consider a tablet form factor for android
var isTablet = osname === 'ipad' || (osname === 'android' && (width > 899 || height > 899));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment