Check BlackBerry OS version

How do I get the BlackBerry OS version via javascript or jquery in a Webworks app?

I tried the following code from a thread "detect blackberry os version" but it isn't working for me:

var limit = '';
var version = /BlackBerry\w+\/([\d\.]+)/i.exec(navigator.userAgent);
if (version[1] && version[1] < limit) {



based on this document...

<script type="text/javascript">
    var ua = navigator.userAgent;
    if (ua.indexOf("BlackBerry") >= 0) {
        if (ua.indexOf("Version/") >= 0) { // ***User Agent in BlackBerry 6 and BlackBerry 7
            Verposition = ua.indexOf("Version/") + 8;
            TotLenght = ua.length;
            document.write("Jorgesys  BB OS Version :: " + ua.substring(Verposition, Verposition + 3));
        else {// ***User Agent in BlackBerry Device Software 4.2 to 5.0
            var SplitUA = ua.split("/");
            document.write("Jorgesys BB OS Version :: " + SplitUA[1].substring(0, 3));
  • be sure to have Javascript Enabled! =)

If you have experienced trouble detecting BlackBerry 10 (as I did after reading this answer!), be aware that the user agent string has changed in BB10, as explained in

In my specific case, I wanted to check if the version was just BB10, for which the next code is enough:

isBlackBerry: function() {
    // Only works with the latest version: BlackBerry 10
    return navigator.userAgent.match(/BB10/i);


Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.