How to create Blackberry Application?

UPDATED: 11 July 2011
Blackberry
I'm giving you the brief information to start develop your blackberry application. Creating blackberry application one need basic knowledge of JAVA. This is for those who are developing the application at professional level because it need API ($20).

Blackberry application developing tool provides all the thing so you don't need to remember method names of RIM( Research In Motion ) package.

Tools to start Developing application
  • - JDK (http://www.java.com)
  • - Eclipse (http://us.blackberry.com/developers/javaappdev/javaplugin.jsp)
  • - API set ($20) when you are developing at professional level. Application registration.

Step 1: Well start eclipse. 

Step 2: Create new project to start your development

Blackberry

Step 3: Name your project. Click finish

Blackberry

Creating first class file for your project. That will be the first page of your application.

Blackberry


Sample code:

package jq.screen;

import jq.dialog.imgDialog;
import net.rim.device.api.ui.MenuItem;
import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.ui.component.Dialog;
import net.rim.device.api.ui.container.MainScreen;

public class Home extends UiApplication{
      public Home() {
        Screen _s = new Screen();
        pushScreen(_s);
      }
      public static void main(String[] args) {
        Home _h = new Home();
        _h.enterEventDispatcher();
      }
      public class Screen extends MainScreen{
        Screen(){
        setTitle("javaQuery - Blackberry");
      }
}
Some important explanation of above code:
  • - extends UiApplication means that will be the first class file and it'll start Blackberry application
  • - Screen extends MainScreen means the screen that displayed on application run mode.
  • setTitle("javaQuery - Blackberry") means set Title of the application

Run your application by right clicking on the project > Run as

1 comment :