PDA

View Full Version : Detecting Phone/OS



kgmoney
13 Oct 2010, 5:26 PM
Hi,

In Sencha Touch, is there a easy way to detect the device os (android vs iphone/ipod). I'm not seeing the same functions that Ext offers for this.

Thanks,
Kevin

evant
13 Oct 2010, 5:33 PM
http://dev.sencha.com/deploy/touch/docs/?class=Ext.is

kgmoney
14 Oct 2010, 5:10 AM
ah, brilliant thanks

jay@moduscreate.com
14 Oct 2010, 5:12 AM
API ftw :)

gaurav.k
8 Feb 2012, 7:51 AM
var isPhone = function() {
return (/android|iphone/i.test(navigator.userAgent.toLowerCase()) && !(/ipad/i.test(navigator.userAgent.toLowerCase())));
};