Device Detection

4 posts, 1 answers
  1. Troy Clemons
    Troy Clemons avatar
    69 posts
    Member since:
    Apr 2010

    Posted 03 Sep 2014 Link to this post

    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
  2. Answer
    Petyo
    Admin
    Petyo avatar
    2439 posts

    Posted 04 Sep 2014 Link to this post

    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!
     
  3. Kendo UI is VS 2017 Ready
  4. Troy Clemons
    Troy Clemons avatar
    69 posts
    Member since:
    Apr 2010

    Posted 04 Sep 2014 in reply to Petyo Link to this post

    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
    }




  5. Troy Clemons
    Troy Clemons avatar
    69 posts
    Member since:
    Apr 2010

    Posted 04 Sep 2014 in reply to Petyo Link to this post

    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
Back to Top
Kendo UI is VS 2017 Ready