Monday 30 May 2011

Test a BlackBerry Java Application


Obfuscating a BlackBerry Java Application

The compiler for the BlackBerry® Java® Development Environment and the BlackBerry® Java® Plug-in for Eclipse® is set to minimize the size of the application. The compiler produces a .cod file that provides obfuscation-like services that are similar to those that obfuscation packages provide in an effort to reduce the size of the .cod file. For example, the BlackBerry Java

Development Environment removes the following information from a .cod file:

Ø       all debug information
Ø       local variable names
Ø       source line numbers
Ø       private method and member names

It is not typically necessary for you to provide obfuscation for your applications in addition to the existing obfuscation that, by default, the BlackBerry JDE provides. In fact, Research In Motion does not perform any additional obfuscation of its own products.

The BlackBerry JDE does not integrate support for obfuscation through third-party tools. You must include a command-line procedure to obfuscate .cod files for use on BlackBerry devices.

Preverifying a BlackBerry Java Application

When you preverify your classes, you reduce the amount of processing that the BlackBerry® device must perform when you install your application. To partially verify your classes before you install your application on a BlackBerry device, you can use the Preverify tool, available with the BlackBerry® Java® Development Environment. You can use the BlackBerry Smartphone Simulator to preverify the .cod files.

For more information about using the BlackBerry Smartphone Simulator, see the BlackBerry Smartphone Simulator User Guide. For more information about using the Preverify tool, see the BlackBerry Java Application Development Guide.

Testing applications on a BlackBerry Smartphone Simulator

After you develop and compile your application, you can test it on the BlackBerry® device. The most common first step is to set the BlackBerry® Java® Development Environment to use a BlackBerry® Smartphone Simulator. The BlackBerry Smartphone Simulator runs the same Java code as the BlackBerry devices, so the BlackBerry Smartphone Simulator provides an accurate environment for testing how applications will function on a BlackBerry device. The BlackBerry JDE includes current versions of the BlackBerry Smartphone Simulator.

Testing applications on a BlackBerry device

After you test your application on the BlackBerry® Smartphone Simulator, you can install your application on a BlackBerry device. If your application uses signed APIs, you might need code signing keys. After you install the application on the BlackBerry device, you can open the application and test its functionality and performance.

For debugging purposes, you can attach your device to the BlackBerry® Integrated Development Environment and use the debugging tool to step through your application code. The BlackBerry IDE can be useful if you are trying to identify a network or Bluetooth® issue, or other issues that are difficult to simulate.

2 comments:

  1. Hello Vadivelan,
    The Article on Test a BlackBerry Java Application, gives detail information about it. Thanks for Sharing the information about the features of testing Blackberry Application, For More information check the detail on the Blackberry App Testing here Software Testing Company


    ReplyDelete
  2. Wow, What a Excellent post. I really found this to much informatics. It is what i was searching for.I would like to suggest you that please keep sharing such type of info.Visit here for Penetration testing services and Software testing services

    ReplyDelete