New to Kendo UI for jQueryStart a free 30-day trial

Returns a number of properties that identify the current mobile browser. Parses navigator.userAgent to do it. False on desktop.

<div id="mobile-info"></div>
<script>
var mobileOS = kendo.support.mobileOS;
var html = "<h3>Mobile OS Information:</h3>";

if (mobileOS) {
    html += "<p>Device: " + mobileOS.device + "</p>";
    html += "<p>Tablet: " + (mobileOS.tablet || "false") + "</p>";
    html += "<p>Browser: " + mobileOS.browser + "</p>";
    html += "<p>OS Name: " + mobileOS.name + "</p>";
    html += "<p>Major Version: " + mobileOS.majorVersion + "</p>";
    html += "<p>Minor Version: " + mobileOS.minorVersion + "</p>";
    html += "<p>Flat Version: " + mobileOS.flatVersion + "</p>";
    html += "<p>App Mode: " + mobileOS.appMode + "</p>";
    html += "<p>Cordova: " + mobileOS.cordova + "</p>";
    
    if (mobileOS.android) {
        html += "<p>Running on Android device</p>";
    } else if (mobileOS.ios) {
        html += "<p>Running on iOS device</p>";
    }
} else {
    html += "<p>Not running on a mobile device</p>";
}

$("#mobile-info").html(html);
</script>

Returns true if running in application mode - pinned to desktop in iOS or running in PhoneGap/WebView.

<script>
var mobileOS = kendo.support.mobileOS;
if (mobileOS && mobileOS.appMode) {
    console.log("Running in app mode");
    // Hide browser chrome, adjust layout for full screen
    $("body").addClass("app-mode");
} else {
    console.log("Running in browser");
}
</script>

Returns the current browser identifier or "default" if the browser is the native one, can be "omini", "omobile", "firefox", "mobilesafari", "webkit", "ie", "default".

Default: "default"

<script>
var mobileOS = kendo.support.mobileOS;
if (mobileOS) {
    console.log("Mobile browser: " + mobileOS.browser);
    
    if (mobileOS.browser === "mobilesafari") {
        console.log("Running in Mobile Safari");
        // Apply Safari-specific workarounds
    }
}
</script>

Returns true if running in a Cordova/PhoneGap/Telerik AppBuilder application.

<script>
var mobileOS = kendo.support.mobileOS;
if (mobileOS && mobileOS.cordova) {
    console.log("Running in Cordova/PhoneGap app");
    // Enable device APIs, adjust for hybrid app environment
    document.addEventListener("deviceready", function() {
        console.log("Cordova device ready");
    });
} else {
    console.log("Not running in Cordova");
}
</script>

Returns the current mobile device identifier, can be "fire", "android", "iphone", "ipad", "meego", "webos", "blackberry", "playbook", "wp", "windows".

<script>
var mobileOS = kendo.support.mobileOS;
if (mobileOS) {
    console.log("Device: " + mobileOS.device);
    
    if (mobileOS.device === "iphone" || mobileOS.device === "ipad") {
        console.log("Running on iOS device");
        // Apply iOS-specific styling
    }
}
</script>

A convenience property to allow easier version checks, for instance:

js
var os = kendo.support.mobileOS;
if (os.ios && os.flatVersion >= 400 && os.flatVersion < 500) {
    // Do something in iOS 4.x
}
<script>
var mobileOS = kendo.support.mobileOS;
if (mobileOS) {
    console.log("Flat version: " + mobileOS.flatVersion);
    
    // Easy version range checking
    if (mobileOS.ios && mobileOS.flatVersion >= 800) {
        console.log("iOS 8.0 or higher");
        // Enable modern iOS features
    } else if (mobileOS.android && mobileOS.flatVersion >= 440) {
        console.log("Android 4.4 or higher");
        // Enable modern Android features
    }
}
</script>

The current OS major version, e.g. "5" in iOS 5.1.

<script>
var mobileOS = kendo.support.mobileOS;
if (mobileOS) {
    console.log("Major version: " + mobileOS.majorVersion);
    
    if (mobileOS.ios && parseInt(mobileOS.majorVersion) >= 7) {
        console.log("iOS 7 or higher detected");
        // Use features available in iOS 7+
    }
}
</script>

The current OS minor versions, e.g. "1.1" in iOS 5.1.1.

<script>
var mobileOS = kendo.support.mobileOS;
if (mobileOS) {
    console.log("Minor version: " + mobileOS.minorVersion);
    console.log("Full version: " + mobileOS.majorVersion + "." + mobileOS.minorVersion);
    
    // Check for specific version requirements
    if (mobileOS.android && mobileOS.majorVersion === "4" && parseFloat(mobileOS.minorVersion) >= 4) {
        console.log("Android 4.4+ detected");
    }
}
</script>

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:

js
if (kendo.support.mobileOS.android) {
    // Do something in Android
}
<script>
var mobileOS = kendo.support.mobileOS;
if (mobileOS) {
    console.log("OS name: " + mobileOS.name);
    
    // Use convenience properties
    if (mobileOS.ios) {
        console.log("Running on iOS");
    } else if (mobileOS.android) {
        console.log("Running on Android");
    }
}
</script>

Returns the current tablet identifier or false if the current device is not a tablet, can be "fire", "ipad", "playbook" or false.

Default: false

<script>
var mobileOS = kendo.support.mobileOS;
if (mobileOS && mobileOS.tablet) {
    console.log("Running on tablet: " + mobileOS.tablet);
    // Apply tablet-specific layout
    $("body").addClass("tablet-layout");
} else {
    console.log("Not running on a tablet");
}
</script>