I found this javascript to detect blackberry devices:
<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));
}
}
</script>
BUT need to target specific BlackBerry’s that are supported:
Blackberry:
9630
9700
8900
9000
Is this possible to target just those Blackberry’s ??
Thank!
Yes each agent has it’s blackberry version.
Example:
**BlackBerry9000**/5.0.0.93 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/179More information on the developers website.
http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/How-to-detect-the-BlackBerry-Browser/ta-p/559862?IID=DEVSF30
use a simple regex to get the version out.