BlackBerry Java® / Java ME Development


The BlackBerry smartphone is a pure Java device with all built-in applications and APIs written in Java. Currently, BlackBerry supports:
  • MIDP Standard APIs (MIDP v2.0 supported) for cross platform development
  • CLDC Standard APIs (CLDC v1.1 supported) for connectivity
  • BlackBerry specific Java APIs around user interface capability, some hardware specific aspects, etc.

Creating Java APIs for the BlackBerry solution enables you to develop rich custom client applications that provide

  • Customizable user interface
  • Local data storage on the device and offline capabilities
  • Listening to events on the system, understanding what the user is doing with the device, and acting accordingly
  • Leveraging the Secure wireless transport provided by the BlackBerry MDS

Advanced Java API capabilities include

  • Integration with BlackBerry Email, PIM and Phone applications
  • Always-on background threads to listen for Push data
  • Communication with Bluetooth®-enabled peripherals
  • Location-based services and BlackBerry® Maps
  • Touch Events and Accelerometer Support


BlackBerry Push APIs

 

The BlackBerry® Infrastructure already contains Push Technology, which is the ability to push data to BlackBerry smartphones. Pushing data is the most efficient way to get information to your customers and by using the BlackBerry Push APIs, developers can also utilize the Push Technology in their applications. Developers with PAP standard knowledge have what it takes to access this technology and start pushing data to their customers.

 

Pushing data is more effienct than the other method of polling, which is a technique where a client periodically asks a server whether an event of interest has occurred. Polling increases OTA costs and traffic as there may be many polling attempts to fetch a single event. Due to polling latency, the user could experience delays in getting their data. Pushing data, on the other hand, delivers data to BlackBerry smartphones in the background without user involvement. The most recent data is synchronized and available on their BlackBerry smartphones the moment they open the application. Polling also wastes battery life checking whether an event of interest has occurred. Whereas, pushing technology listens in the background for the server to push data to it, instead of constantly checking for new data.

 

 

The Java® / Java ME development architecture revolves around the Push Request workflow. First, the server sends a PAP Push request which contains a list of specified devices. The BlackBerry Infrastructure sends a response to the Server and queues the request. The BlackBerry Infrastructure then pushes data to the specified devices through Java applications utilizing the BlackBerry Push APIs. Each device sends an ACK to the BlackBerry Infrastructure, which then sends a notification to the Server. Lastly, the server sends a Read notification to the BlackBerry Infrastructure.

 

BlackBerry Java Development Tools

 

How do you go about developing a Java application for BlackBerry? There are a variety of options and it is up to the developer to determine which one suits them best.

 

The BlackBerry® Java Development Environment (BlackBerry JDE) Plugin for Eclipse allows a developer to leverage the existing standard Eclipse development environment. By using the BlackBerry plugin with that environment, the application development should be seamless from a compilation, projects and workspace perspective, simulation and debugging, and deployment of the application. Other features include:

  • Debugging: Java Debug Wire Protocol (JDWP) Development
  • Optimization: Objects and Profiling Window
  • Localization Support: Editor for BlackBerry resource bundles
  • Supports building against multiple JDEs: Leverage the BlackBerry JDE component package to add appropriate BlackBerry JDE version support; V4.5.0 shipped with installer by default
  • Simulator Integration: Complete integration of simulator with Eclipse including simulator output to console window

 

The BlackBerry JDE is a custom development environment created by RIM. It gives the developer seamless access to the simulators, debugging support, and a variety of documentation. Other features include

  • Debugging: Full breakpoint support; View and modify variables during breakpoint; View Threads, Locks, Objects and Processes
  • Development: Resource Editor; Source Control Integration
  • Optimization: Memory Statistics; Source Code Profiler
  • Documentation: Javadocs and JDE Help
  • Sample Applications: Server and Client samples are provided with the BlackBerry JDE installation, with each sample focusing on how to leverage a specific API

 

The BlackBerry JDE Component Package is a simple and small installer which includes the key pieces necessary for integration with other development environments. This allows developers to debug, compile, code sign and deploy their applications within other IDEs of their choice. The most common one that fits within this category is NetBeans.

 

BlackBerry Simulators

 

Use BlackBerry® Smartphone Simulators to view and test how BlackBerry® Device Software and the screen, keyboard and trackwheel/trackball will work with your application. With a BlackBerry Smartphone Simulator, you can run and debug applications on your computer as if they were on an actual BlackBerry smartphone.

 

The Smartphone Simulator contains the following key features:

  • Network Connectivity/Coverage
  • Battery Levels
  • microSD Card
  • GPS Location
  • Camera Image
  • USB Cable Connected
  • Incoming Voice Calls

The BlackBerry Email and MDS Services Simulator Package:

  • Simulates HTTP and socket connections
  • Allows simulation of push functionality
  • Simulate email functionality
  • Stand-alone or POP3 integration

 

Source: http://na.blackberry.com