This is a migrated thread and some comments may be shown as answers.

Device Detection

3 Answers 474 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Troy Clemons
Top achievements
Rank 1
Troy Clemons asked on 03 Sep 2014, 05:13 PM
I am using the Kendo UI/Mobile UI, is there a way to return
the current IOS version in javascript. I need to hide certain
controls (file upload mainly) as iOS does not support this type
pre iOS7.

Thanks

Troy

3 Answers, 1 is accepted

Sort by
0
Accepted
Petyo
Telerik team
answered on 04 Sep 2014, 07:43 AM
Hello Troy,

Please check the mobileOS field in the kendo support object.

Regards,
Petyo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Troy Clemons
Top achievements
Rank 1
answered on 04 Sep 2014, 12:41 PM
I followed your link, and it does give the code I was looking for. But there is a small problem.

kendo.support.mobileOS only returns true or false

there is no device, majorVersion, minorVersion or os.flatVersion capable in anything
that is returned or available.

I am using the latest and greatest Kendo UI/Mobile

support.mobileOS
 
device String
 
Returns the current mobile device identifier, can be "fire", "android", "iphone", "ipad", "meego", "webos", "blackberry", "playbook", "wp", "windows".
 
tablet String (default: false)
 
Returns the current tablet identifier or false if the current device is not a tablet, can be "fire", "ipad", "playbook" or false.
 
browser String (default: "default")
 
Returns the current browser identifier or "default" if the browser is the native one, can be "omini", "omobile", "firefox", "mobilesafari", "webkit", "ie", "default".
 
name String
 
Returns the current os name identifier, can be "ios", "android", "blackberry", "windows", "webos", "meego". For convenience a property with the os name is also initialized, for instance:
 
majorVersion String
 
The current OS major version, e.g. "5" in iOS 5.1.
 
minorVersion String
 
The current OS minor versions, e.g. "1.1" in iOS 5.1.1.
 
flatVersion Number
 
A convenience property to allow easier version checks, for instance:
var os = kendo.support.mobileOS;
if (os.ios && os.flatVersion >= 400 && os.flatVersion < 500) {
    // Do something in iOS 4.x
}




0
Troy Clemons
Top achievements
Rank 1
answered on 04 Sep 2014, 12:58 PM
disregard the last post, if on desktop you only return false, but on mobile device it returns all available
variables with there correct returned information.

Thanks
Tags
General Discussions
Asked by
Troy Clemons
Top achievements
Rank 1
Answers by
Petyo
Telerik team
Troy Clemons
Top achievements
Rank 1
Share this question
or