Last active
December 25, 2015 11:19
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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