1

I'm currently trying to use the BBM SDK 1.0 (net_rim_bb_qm_platform.jar). The integration works no problem, except when the device has a BBM version lower than 6, as per the library's requirements.

I'm wondering if there's some sort of "reflection" type of system I could use to test at startup whether to include the library, which I highly doubt. Or a way to restrict downloads on App World, i.e. if the device has BBM 5, download a version without BBM integration, else download the other.

Nate
  • 31,017
  • 13
  • 83
  • 207
Kevin
  • 1,626
  • 16
  • 30

1 Answers1

2

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.

Nate
  • 31,017
  • 13
  • 83
  • 207
  • Hi Nate, thank you for the answers. They are always helpful. The linked examples make sense, but I'm not quite sure how I'd go about packaging applications together. It seems to me both of those approaches require it. I have not been able to find an answer on the web. Any advice? – Kevin Jul 12 '13 at 07:05
  • @Turdnugget, packaging multiple **applications** together, or packaging an **application** along with another **library**? This was a month ago, so I'm a little fuzzy now, but I thought this solution involved using a BBM interface *library*. Are you asking how to package this library with your application? – Nate Jul 12 '13 at 07:47
  • Sorry for the timelapse, the project is nearing an end and I want to make sure I can deploy as intended. I chose to use a proxy method. So a proxy app is launched, detects if bbm is present on the device. If so it launches the intended app. I would like to know how to package the application, and the proxy application together. So that the user doesn't need to download them separately. – Kevin Jul 12 '13 at 08:02
  • Are you releasing this through the BlackBerry World store, or deploying yourself via a web server? – Nate Jul 12 '13 at 08:16
  • Probably bb world, but the client might change his mind at anytime. Could you perhaps cover both? – Kevin Jul 12 '13 at 08:19
  • 1
    Sorry, it's 1:30am my time, and I'm heading off to sleep ... I can post more tomorrow. If you're in a hurry, you could try simply asking this as a separate, new question ... how to package multiple applications for release via BlackBerry World and also by deploying via website (the jad/cod approach). – Nate Jul 12 '13 at 08:36
  • I found some links that answer my questions. But I'll post a question too to get your input, and maybe help others later. Thanks again – Kevin Jul 16 '13 at 06:11