Getting Started with BlackBerry

Video Tutorials:

  1. Requirements

  • Windows XP (32-bit) or Windows 7 (32-bit and 64-bit) or Mac OSX 10.6.4+

For 4.x devices check out this guide.

  1. Install SDK + PhoneGap

  • (Windows Only) Download and install SUN JDK (32-Bit Version). Add it to your PATH variable.
  • (Windows Only) Download and extract Apache Ant. Add it to your PATH variable.
  • Download BlackBerry WebWorks Smartphone SDK for BlackBerry development and/or BlackBerry WebWorks Tablet OS SDK for Playbook development. Keep note of the directories you install these SDKs.
  • Download the latest copy of PhoneGap and extract its contents. We will be working with the Android directory.
  1. Setup New Project

  • Open up a command prompt/terminal and navigate to where you extracted PhoneGap. CD into the PhoneGapBlackBerry directory.
  • Create a PhoneGap BlackBerry and PlayBook project. Type 'ant create -Dproject.path='followed by the location you wish to create your project into the command prompt/terminal.
  • Change to the newly created directory located at C:\Dev\bbw\sample.
  • Open up the project.properties file with your favourite editor and change the lines BlackBerry.bbwp.dir= and PlayBook.bbwp.dir= to equal the respective install locations of the SDKs you downloaded earlier.
  1. Hello World

Build the PhoneGap sample project by typing ant target build in your command prompt/terminal while you are in your project's directory. Replace the target with either blackberry or playbook. Note this is the sample PhoneGap project and not a basic hello world application. You can go edit the index.html file located in the www directory of your project to make it say Hello World if you wish.

5A. Deploy to Simulator (Windows Only)

  • While in your project directory, in command prompt/terminal type ant target load-simulator. Replace the target with either blackberry or playbook.
  • Press the BlackBerry button on the simulator, go to downloads and you should see your app loaded there.

5B. Deploy to Device (Windows and Mac)

  • You have to have your signing keys from RIM by filling out this form.
  • While in your project directory, in command prompt/terminal type ant target load-device. Replace the target with either blackberry or playbook.
  • Press the BlackBerry button on the simulator, go to downloads and you should see your app loaded there.

Done!

You can also checkout more detailed version of this guide here.