Start developing BlackBerry Application


Introduction

BlackBerry is keep booming due to its flexibility of customized application development for range of industry, business types and business needs, it has a 55% market share in North America and millions of customers all over the world. The Blackberry OS was created by RIM (Research in Motion), for Smart phone Blackberry. BlackBerry is one of the leaders in Smart phone industry. Current version of the Blackberry OS contains rich multimedia and graphic features.

You can use your "existing skills, develop with industry standard tools such as Eclipse and Microsoft Visual Studio, and choose from a number of development approaches, including Java and web" for BlackBerry development. There are two BlackBerry development environments produced by RIM. The BlackBerry Java Development Environment (JDE), and the BlackBerry JDE Plug-in for Eclipse. Both are very functional and have been used by developers to produce professional applications.

As per the BlackBerry guidelines :- when you design applications for BlackBerry devices, try to be as consistent as possible with other BlackBerry device applications. Consider the following guidelines

  • Use or extend existing UI components where possible so that your application can inherit the default behavior of the component.
  • Follow the standard navigation model as closely as possible so that users can make full use of the keyboard and trackball.
  • Make all actions available from the menu. Verify that the actions available in the menu are relevant to users' current context.

When you design your application, also consider the following guidelines:

  • Stay focused on users' immediate task. Simplify data selection and presentation to display only the information that users need at any one moment.
  • Display information in a way that makes effective use of the small screen.

Standard system requirements

  • Computer monitor with resolution 1024-768 or higher
  • Intel Pentium 4 Processor (minimum 3 GHz)
  • 1.5GB Hard drive
  • 1GB RAM
  • Microsoft Windows Vista, or Windows XP

Plug-in requirement

Installation steps of BlackBerry JDE Plug-in for Eclipse

  • Run the BlackBerry_JDE_Plugin.exe and click on next button to start installation of Eclipse plug-in

    BlackBerry Java Plugin for Eclipse

  • Accept the term and condition and go ahead

    intall BlackBerry Java Plugin

  • Set the path where you want to install the plug-in and go ahead

    Install BlackBerry Java Plugin for Eclipse

  • Choose shortcut option and go ahead

    Installation of BlackBerry Plugin

  • Carefully read the review and go ahead

    Reviews of BlackBerry Java Plugin

  • Wait till installation processed

    install BlackBerry Plugin

  • Finish the installation and run Eclipse java plug-in

    BlackBerry Java Plugin

Lets Creating simple Hello Project for BlackBerry

  • When you click on Done to finish the plug-in installation, the workspace launcher will shows and ask for the path of workspace. So, choose the path and go ahead

    BlackBerry application

  • Now select a new project in eclipse, and chose BlackBerry project wizard

    BlackBerry application in eclipse

  • Give the name your project. Here I gave HelloBlackBerry

    BlackBerry project

  • Now create a new class in src folder which is in package explorer

    Java class in BlackBerry project

  • Give name to the class. Like I gave Hello

    Java class name in BlackBerry project

  • Write this code into this class

    import net.rim.device.api.ui.*;
    import net.rim.device.api.ui.component.*;
    import net.rim.device.api.ui.container.*;
     
    public class Hello extends UiApplication {
       
    public static void main(String[] args) {
            Hello theApp =
    new Hello();
            theApp.enterEventDispatcher();
        }
       
    public Hello() {
            pushScreen(
    new HelloWindow());
        }
    }
     
    final class HelloWindow extends MainScreen {
       
    public HelloWindow() {
           
    super();
            LabelField title =
    new LabelField("Simple BlackBerry Application", LabelField.ELLIPSIS
                | LabelField.USE_ALL_WIDTH);
            setTitle(title);
            add(
    new RichTextField("Hello"));
        }
     
        public boolean onClose() {
            Dialog.alert(
    "bye!");
            System.exit(0);
           
    return true;
        }
    }
     
  • Now run the application and select BlackBerry simulator

    BlackBerry simulator

  • Output look like the figure below

    BlackBerry output

  • Now choose menu option and select your application named HelloBlackBerry and the output is like below 

    BlackBerry project output

  • Now when you click on back button show will get a message like below

    BlackBerry
The above bye message dialog is populated by the onClose method:

      public boolean onClose() {
         Dialog.alert(
"bye!");
         System.exit(0);
         
return true;
     }

Hope you like this article. Post your comments and feedback so that I can improve myself. 

Thank You..


Similar Articles