Blackberry’s – royal pain in the butt to be honest.
I had built a lovely mobile site which worked beautifully on all browsers and my Android & iPhone. The some clever so-so (the client I belive) pointed it out it didn’t work on a Blackberry.
Grrr…
So here, for the record, are the steps/hoops I had to jump through to get it working on a Blackberry.
Tip 1: Dont bother with the emulators. Massive in size and pretty much pointless imho. Get your hands on an actual Blackberry device or two (I borrowed a colleague’s for the day) Its really the only way you can quickly see any changes you make to fine tune the site (as much fun as that sounds).
Tip 2: Older Blackberry models (version 4 I think) just simply dont have any capacity for things like Ajax so I’ve been aiming for compliance with the newer version (I think its 5 or 6?)
If the client wants it to work on older Blackberries then you might end up having to build a separate site completely 🙁
The problems I had were that
1) Jquery just doesn’t work – But there is an alternative jQlite http://code.google.com/p/jqlite/ which works on Blackberry’s (with only a subset of features of jQuery but enough to be going on with)
2) The Background-size CSS rule doesn’t work so you need to have a separate normal sized sprite if you’re using large sprites to work on mobile devices
3) The Modernizr plug-in doesn’t work either (even though they say it should – I found functions miraculously started working when I removed it…)
What I ended up doing for the site in question was:
a) Detect if the site is a Blackberry using a simple PHP script which queries the User Agent in the header
b) If its a Blackberry – load an alternative stylesheet that doesn’t use background-size (and any other non-supported CSS rules)
c) If it is a Blackberry – don’t load jquery – instead load jqlite – and then test cos I think some of the cooler new versions of jQuery animations aren’t supported in jqlite. (When you’re testing the jquery/jqlite stuff I found it easier for debugging to change the switch from “blackberry” to whatever browser/OS i was using on my PC so I could see what script errors were being thrown)
d) If it is a Blackberry – dont load Modernizr
Its really annoying not having my own device I can test this with. But I’ll be damned if I’m going to sign up with a contract with one of those beastly things just to do web testing!