LDSTechForumProjects

Gospel Library for BlackBerry getting started

Mobile Gospel Library Project Index edit

Development environment

Because of the large number of existing BlackBerry users still using older devices, we must target our official releases at OS 4.2.1. This means we won't have access to some of the newer APIs that might make our job easier, such as those that support SQLite databases (new in OS 5.0).

With the release of the BlackBerry JDE Plug-in for Eclipse 1.1, component packs older than 4.5.0 are not available on the standard update site. As of 26-Jun-2010, component packs for 4.3.0 and 4.2.1 are available on the update site for the Beta version of the 1.1 JDE plug-in.

To target OS 4.2.1, there are a few options:

  1. Fresh install of Everything
  2. Add the BlackBerry JDE plug-in for Eclipse 1.1 Beta update site.
  3. Configure the BlackBerry JDE Plug-in for Eclipse v1.1 to use the 4.2.1 Component Pack from the 1.0 plugin.
  4. Use an existing installation of the BlackBerry JDE Plug-in for Eclipse v1.0
  5. Target a later version, but only use APIs supported by 4.2.1
  6. Use the 4.2.1 BlackBerry JDE

Fresh install

The following will steps will help you set up Eclipse if you've never set up Eclipse for BlackBerry development (or you're tired of trying everything else that doesn't seem to work).

Prerequisites

You need to download the following:

Installation of Eclipse

Eclipse does not require an official installation process. Just extract the zip file to C:\eclipse.

Installation of Java SE SDK from Oracle

This step is vital! Install the Java SDK. Choose both versions below:

Add an entry to your Windows Environment variables:

  • Right click My Computer > Properties > Advanced > Environment Variables
  • Click "Add":
    • Name the variable, "JAVA_HOME."
    • Enter the directory of each SDK to the value, e.g. "C:\\Program Files (86)\Java\<SDK version 1>\bin; C:\\Program Files (86)\Java\<SDK version 2>\bin;"

Install BlackBerry Plug-ins for Eclipse

Install Android Plug-ins for Eclipse

  • Click Add ...
  • Name the new repository, "ADT Translation Manager Plugin." In the location, enter, "https://dl.google.com/alt/"
  • Press Enter.
  • Select "Android Developer Tools - Translation Manager" and click Next to install.

Install the Subclipse Plug-in for Eclipse

This should get your development environment ready for development.

Using the 4.2.1 BlackBerry JDE

There's not much to say here. Just install the JDE and configure a project using the source files from the Subversion repository.

Using the BlackBerry JDE Plug-in for Eclipse v1.0

This tool is being discontinued by RIM. While you can still download the plug-in itself, it's no longer possible to obtain the 4.2.1 Component Pack from RIM's web site. If you don't already have it installed you cannot use this option.

Targeting a later OS version

You can use tools that support newer OS versions, including the BlackBerry JDE Plug-in for Eclipse v1.1, but refrain from using any APIs not supported by 4.2.1. The Blackberry API Javadoc indicates the minimum OS for each class and method it describes. If you select this option you may contribute source code to the project but you will be unable to test against a 4.2.1 simulator.

Configuring the BlackBerry JDE Plug-in for Eclipse v1.1 to use a 4.2.1 Component Pack from the v1.0 plugin

Note: You must have a previous install of the BlackBerry JDE Plug-in for Eclipse v1.0, including the 4.2.1 Component Pack. The component pack can no longer be obtained from the BlackBerry web site.

-Dee.home=C:\Program Files (x86)\Eclipse 3.5\plugins\net.rim.eide.componentpack4.2.1_4.2.1.17\components
-Dee.executable=${ee.home}\simulator\fledge.exe
-Dee.bootclasspath=${ee.home}\lib\net_rim_api.jar
-Dee.javadoc=file:${ee.home}\docs\api
-Dee.language.level=1.3
-Djava.home=${ee.home}
-Dee.name=BlackBerry JRE 4.2.1
-Dee.description=BlackBerry Java API Definitions, simulators and utilities for BlackBerry smartphone OS version 4.2.1.17
-Dee.copyright=Copyright (c) Research In Motion Ltd. 1997-2009  All Rights Reserved.
-Dee.output.folder.suffix=4.2.1

Be sure to edit the path in the first line if you've installed Eclipse 3.5 in a different directory. Save this file in the directory indicated in the first line. Name it BlackBerry.ee.

  • Configure Eclipse to use the 4.2.1 Component Pack
    • Open Eclipse 3.5.
    • Open Windows -> Preferences, then navigate to Java -> Installed JREs.
    • Click Add...
    • Select "BlackBerry Execution Environment VM" and click Next
    • Click the "File..." button next to Definition File and browse to the BlackBerry.ee that you created earlier.
    • Click Finish

You should now be able to target BlackBerry OS 4.2.1 with the Eclipse 4.5 IDE and the BlackBerry JDE Plug-in 1.1.

Project source code

The Subversion repository for this project is located at https://dev.lds.org/svn/scriptures/blackberry/

To open the project:

  • Open Eclipse.
  • Open File -> New -> Project...
  • Expand SVN. Select Checkout Projects from SVN and click Next.
  • Select Create a new repository location. Click Next.
  • Type in the repository url (https://dev.lds.org/svn/scriptures/blackberry/)
  • Expand trunk and select BBScriptureReader. Click finish.

This will check the code out. In order to build and run, you may have to do the following (I did).

  • Right click your project folder. Select Build Path -> Configure Build Path...
  • Click Add Library...
  • Select JRE System Library and click Next.
  • Select Alternate JRE and BlackBerry JRE 5.0.0 from the drop down menu.
  • Select JRE System Library (BlackBerry JRE 4.2.1) and click Remove.
  • Click Finish.

You should be set up and ready to go.

Bugs and feature requests

The JIRA issue tracking system is located at https://tech.lds.org/jira/browse/MSBB/

This page was last modified on 11 June 2013, at 16:22.

Note: Content found in this wiki may not always reflect official Church information. See Terms of Use.