views:

726

answers:

1

I am wondering if anyone out there has experience writing application for blackberry smart phones. In particular, I am wondering how they get around the myriad permutations of model number/carrier and OS.

Is there a recommended approach on how to write your code so that it targets the widest range of smart phones?

Are there compiler switches that can be used to target code for particular model numbers?

Any advice would be fanstastic.

+10  A: 

Tips for wide range devices

The question is: how to write code that will handle different RIM OS, carriers and device models? In code that will depends on available/deprecated API, in workflow about handling carriers features and characteristics of device.

First of all, read How To - Develop applications for different BlackBerry Device Software versions and BlackBerry smartphone models

Wide range RIM OS support

StackOverflow - Which BlackBerry OS version to target for? - to be short, my choice is RIM OS 4.5

Tips for 4.7 - 4.6 - 4.5 - ? support:

  • navigation, use accelerometer and touchscreen, but don't forget about trackball and menu
  • borders, there are no BorderFactory in 4.5 and earlier
  • background, there are no Background in 4.5 and earlier
  • transparency, there is no Graphics.setGlobalAlpha(alpha) in 4.5 and earlier
  • multimedia, different formats are supported on differen OS and phones

See also
Blackberry - How to add border to BasicEditField?
Setting background and font colors for RichTextField, TextField
Skinning Blackberry Application
What Is - Supported audio formats
Support - Playing audio pauses Media app on BlackBerry CDMA smartphones
How To - Record Audio on a BlackBerry smartphone

Carrier support

I have no statistical information about BlackBerry carriers. But lets see what are those carrier features we can meet:

  • if we use carrier network resources, carrier controlls all network configuration. That means on ex. we may have no UDP, max. transfer file size about 3 Mb, and we will have to config APN settings
  • also, carrier and device combination defines what GPS type is accessible. And for Verizone, there is a special signing process to access GPS.

See also
What Is - Restricted ports
What Is - Network Diagnostic Tool
How To - Determine when to route data
What Is - Different ways to make an HTTP or socket connection
How To - Specify APN information for a direct TCP connection
What Is - Best practices for designing GPS applications for BlackBerry CDMA smartphones
What Is - The BlackBerry smartphone models and their corresponding GPS capabilities
What Is - Verizon GPSSettings signing requirement

Different devices

Things which may help support set of devices:

  • use flexible, elastic UI elements, change size and layout according to screen size
  • use several graphic resources sets of different size
  • control font type and size
  • before use camera, check if it's available

See also
What Is - Compatibility mode on touch screen BlackBerry smartphones
What Is - Image formats used in BlackBerry applications

Building several RIM OS

There are preprocessor directives, but I prefer to use BB Ant tools, copy/delete all platform version diff (code, resources) and target appropriate rapc directory from build task.

See also
How To - Use the preprocessor

Max Gontar
Casebash