(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-5276656-4', 'mobileesp.com'); ga('send', 'pageview');

BlackBerry Device Detection Recipes

Hi, folks —

A developer using MobileESP for a commercial project and I recently exchanged emails about BlackBerry device detection. Generally speaking, the BlackBerry OS has lagged other smartphone OSes with regards to browser capabilities. This situation has made it challenging for web developers who wish to provide quality experiences on their web sites to BlackBerry OS users.

MobileESP has lots of methods to detect BlackBerry devices — six! But all of them were created for specific purposes to help better target specific classes of BB devices. You may find it helpful to review the full list of BlackBerry detection methods in the MobileESp API documentation. Here is a little more info on the key detection methods nowadays.

The purpose of the old DetectBlackBerryHigh() and -Low() methods was really for the two levels of pre-OS 6 version devices. After OS 6, if you need BlackBerry specifically, then you might use one (or a combination of) the following:

  • DetectBlackBerry(): For any BlackBerry device, phone or tablet
  • DetectBlackBerryTablet(): For tablets only.
  • DetectBlackBerryWebKit(): For any “modern” BlackBerry device (phone or tablet) running BlackBerry OS. Generally speaking, this will test true on OS 6 or later.

So if you want a modern BlackBerry phone (OS 6 or later), then run this recipe:

  • DetectBlackBerryWebKit() && !DetectBlackBerryTablet()

Or if you want any BlackBerry phone (any version OS), the run this recipe:

  • DetectBlackBerry && !DetectBlackBerryTablet()

Of course when the new BlackBerry OS 10 launches in 2013, we will update MobileESP soon after!

And as you may have already read in the MobileESP blog, we generally recommend using the DetectTierX methods unless you are looking for a specific device for a specific purpose. For example, you should use DetectTierIphone() to detect all modern smartphones with an iPhone-class web browser running a variety of OSes.

Owner of the MobileESP project. For the latest source code downloads, visit: https://github.com/ahand/mobileesp

Posted in General, Mobile Web Site Design