First, you need to decide whether your app must have BBM, or if it can still run without BBM, in some degraded mode (fewer features). It sounds like your app can run without BBM, so I'll address that scenario:
Take a look a this documentation and sample code from R. Masroor on BlackBerry.com.
From the description (bold is mine):
The RIM supplied BBM dependency checker samples, provide two
approaches to integrating with BBM.
a) The proxy method which is appropriate when the application will not
run without BBM – it directs the user to download BBM.
b) By contrast,
the interface method provides a way for an application to isolate
itself from the BBM, so that the application can still run even if BBM
is not installed.
Why is this isolation needed? Because if a cod (project) references
any BBM methods, then BBM must on the device and at a suitable level
before that cod can be loaded. So if an application directly
references BBM and there is no BBM (or no suitable level of BBM) on
the device, the application will not run.
Of the two approaches, the interface approach is probably the most
useful, as most applications have functionality without BBM. But this
approach has two disadvantages:
• It requires a start up process to
register the RuntimeStore
Object
• The layered approach and the use of
call-backs makes this quite complicated for me.
The attached project demonstrates a variation on the interface method,
that creates the interface object at Application start-up, using
class.forName()
. Aside from this change, the sample provided is
similar to the interface method, and is explained below. After the
explanation of the attached project, this document explains how to
create a different structure which you may find easier to work with.
Also, for reference, you can take a look at the BBMSDKDemoProxy
sample project that comes with the BBM SDK download.