Getting Mobile Resolution
Is it possible to get the screen resolution of the device? screen.width/height does not work…
Alternatively, how can I differentiate between the iPhone/2G/3G/3GS and the iPhone 4's resolution?
1 Answer
-
Accepted Answer
For resolution try
Titanium.Platform.displayCaps.platformWidth Titanium.Platform.displayCaps.platformHeight
For device detection I think this might help
Titanium.Platform.model
This should give you some ideas:
http://github.com/appcelerator/titanium_mobile/blob/master/demos/KitchenSink/Resources/examples/platform.js