BlackBerry Java SDK 6.0
You can display on a screen a visual cue that indicates to a BlackBerry device user that work is being done or that a task is proceeding by using the Activity and Progress Indicator API that is provided in the net.rim.device.api.ui.component.progressindicator package. The activity indicator represents an activity with an unknown duration. The progress indicator represents progress that is represented numerically (for example, as a percentage of a completed task). The Activity and Progress Indicator API uses a model-view-controller architecture.
An activity indicator uses a bitmap that contains frames of an animation. You use the ActivityImageField and ActivityIndicatorView classes to create an activity indicator. You can add an activity indicator to any UI component, such as a screen, text field, or list item. You can also add text to an activity indicator to describe the action.
A progress indicator uses a bar that fills as the task completes. A progress indicator includes a label to indicate what the action is, and a horizontal bar that fills from left to right to show the progress of the action. You use the ProgressBarField and ProgressIndicatorView classes to create a progress indicator.
You can encapsulate functionality so that it can be reused across your application and other applications on the BlackBerry device by using the Command Framework API that is provided in the net.rim.device.api.command and net.rim.device.api.command.registrar packages. For example, if your application has a button and a menu item that perform the same actions, you can define that common functionality once and reuse it across both UI components. In previous releases of the BlackBerry® Java® SDK, you had to derive the functionality for each UI component which resulted in the multiple implementations of the same functionality.
You can create commands that can be used by other applications on the device by using the classes and interfaces that are available in the net.rim.device.api.command.registrar package. For example, you can register a command that provides copy and paste functionality by using the CommandRegistrarConnection interface and allow other applications to retrieve and execute the command from their application.
- Home screen shortcut
- pane manager
- pop-up menu
Home screen shortcuts
You can allow BlackBerry device users to create shortcuts and add them to the Home screen on the BlackBerry device by using the Shortcut API that is provided in the net.rim.blackberry.api.homescreen package. For example, you can allow users to create a shortcut to a contact so that when the user selects the shortcut, the Contacts application opens and displays the specified contact. You can allow users to create shortcuts for a wide variety of reasons such as a shortcut to a browser bookmark, map location, or playlist. You can provide users with a picker to choose where they want to add a shortcut on the Home screen (for example, a folder) by using the HomeScreenLocationPicker that is provided in the net.rim.device.api.ui.picker package.
Image scrolling enhancements
With BlackBerry Java SDK 5.0, you can display a row of images on a BlackBerry device screen that a BlackBerry device user can scroll through, by using the PictureScrollField class that is provided in the net.rim.device.api.ui.extension.component package. For each image you can provide a caption and callout text that appears when the user scrolls through the images.
- You can specify the padding below an image by using the PictureScrollField.setPaddingImageBottom() method.
- You can control the distance between images and allow them to overlap by using the PictureScrollField.setImageDistance() method.
- You can specify whether to display a scroll bar by using the PictureScrollField.setScrollbarVisible() method.
- You can manage the height of the PictureScrollField by using the PictureScrollField.setStyle() method.
- You can update images at runtime by using the PictureScrollField.updateImage() method.
Absolute layout manager: You can specify the absolute position of a field on a screen by using the AbsoluteFieldManager class that is provided in the net.rim.device.api.ui.container package. You can use AbsoluteFieldManager to control the placement of fields on a screen based on coordinates (x, y). For example, you can overlap fields on the screen of the BlackBerry device. The EyelidFieldManager class is an extension of AbsoluteFieldManager.
Pane managers: You can present screens within your application as panes by using the Pane Manager API that is provided in the net.rim.device.api.ui.component.pane package. The pane manager provides views of filtered content and allows BlackBerry device users to navigate content without leaving the context of the screen. You can use the Pane Manager API to present panes as scrollable panes or as tabs. Each pane supports its own layout manager, title, and view. The title represents the title of the pane that the user interacts with. The view specifies whether the pane is scrollable or a tab.
In the scrollable view, users can swipe across the screen or trackpad to move through each pane and to move it left or right. You can animate the transition from pane to pane (for example, horizontal movement or fading). For a scrollable pane, you use the HorizontalScrollableTitleView class to display the title of each pane in the scrollable view. You use the HorizontalScrollableController class to provide controls that allow users to switch between the panes by using the trackpad and touch screen.
The tab view displays all the available tabs on the screen. For a tab pane, you can use the HorizontalTabTitleView and HorizontalTabController classes to display the title of each pane as a separate tab and to provide controls that allow users to switch between the panes by using the trackpad or touch screen. The HorizontalTabTitleView also provides the ability to animate the transition from pane to pane.
Tables and lists
You can create dynamic tables and lists in your application by using the Table and List API that is provided in the net.rim.device.api.ui.component.table package. For example, in response to the BlackBerry device user's input, or to events in your application, you can generate a table, and then add, change, or delete the rows and columns and the associated content.
A simple list allows you to display text in rows. With earlier versions of the BlackBerry Java SDK, you can create a list by using the ListField class. With BlackBerry Java SDK 6.0 you can create a simple list by using the SimpleList class.
A rich list allows you to display text and icons in rows. You can create a rich list by using the RichList class.
A table allows you to display a rows, columns, and cells. You can change the background, font, background effect, and selection effects. You can define groups of rows, columns, or cells and create collapsible sections. You can group items under headers that always appear in the table. You can also use a table to create a tree view. Simple lists and rich lists are implementations of a table.
You can create a table by using the TableView class.
With BlackBerry Java SDK 5.0, you can enable BlackBerry device users to navigate to the files on a BlackBerry device by using the FilePicker class that is provided in the net.rim.device.api.ui.picker package.
With BlackBerry Java SDK 6.0, you can use the FilePicker.setView() method to open a file picker that is specific to a file type. For example, pass in the VIEW_PICTURES constant to open a file selection dialog box for picture files. You can specify file types such as ring tones, videos, voice notes, music files, and images.
With BlackBerry Java SDK 5.0, you can enable users to choose a location from a list that you define by using the LocationPicker that is provided in the net.rim.device.api.lbs.picker package.
With BlackBerry Java SDK 6.0, you can enable users to select locations that are saved as favorites in BlackBerry® Maps. If BlackBerry Maps is available on the device, the location picker for BlackBerry Maps favorites is registered as a global location picker. You can retrieve registered location pickers by using the LocationPicker.getGlobalLocationPickers() method.
Location picker for geotagged photos
You can enable users to select a location from a geotagged photo by using the GeotaggedPhotoPicker class that is provided in the net.rim.device.api.lbs.picker package. For example, a user can select a geotagged photo from the pictures library to see the geographical coordinates for the location. The location picker for geotagged photos works only with .jpeg files that contain geotag metadata that is encoded as EXIF data. The user can turn on the geotagging feature in the camera options of the device.
Location picker for Home screen shortcuts
You can enable users to choose where they want to add a shortcut on the Home screen (for example, a folder) by using the HomeScreenLocationPicker that is provided in the net.rim.device.api.ui.picker package.
detect default APN
Popup menus and submenus
You can add a pop-up menu and a submenu to your application by using the classes provided in the net.rim.device.api.ui.menu package.
Popup menu: A pop-up menu, similar to a context menu, contains a list of the most common actions that BlackBerry device users can perform within the current context. An item in the pop-up menu can include the text, an application icon, and a command. A pop-up menu replaces a context menu, or a short menu, that was available in previous versions of the BlackBerry Java SDK. The BlackBerry Device Software automatically converts an existing context menu into a pop-up menu.
Submenu: A submenu is a group of related menu items. A submenu appears as a subset of a menu item in the full menu. When you include items in a submenu, users can find frequently-used items or important items more easily in the full menu.
Title bar enhancements
You can add useful information to your application's title bar by using the StandardTitleBar class that is provided in the net.rim.device.api.ui.component package. With earlier versions of the BlackBerry® Java® SDK, you can invoke MainScreen.setTitle() to add text to the title bar of your application's screen. By using the new StandardTitleBar, you can easily display the following additional information:
- Application icon, descriptive title, and time
- Application notifications, such as a new message indicator
- Wireless connection indicators, including the network coverage indicator, wireless coverage area indicator, GPS indicator, Bluetooth indicator, and Wi-Fi connection indicator
- Battery power level indicator
- Active call indicator
On BlackBerry devices with a touch screen, you can provide BlackBerry device users with quick and easy access to frequent actions in an application or on a screen by using the Toolbar API that is provided in the net.rim.device.api.ui.toolbar package. Each toolbar consists of buttons that appear at the bottom of the screen. The toolbar is visible when the user interacts with the application. The buttons can consist of an icon and text. If you provide both an icon and text, when the user selects the button, the text appears above the button.
Convenience key access
Convenience keys are typically located on the left and right sides of the BlackBerry. You can access convenience keys on the device by registering your application with the KeyHandlerRegistry class that is provided in the net.rim.device.api.system package. When a BlackBerry device user presses a convenience key on the device, your application can respond while it is running in the background. You can programmatically set your application as the default application that opens when a user presses a convenience key, regardless of whether the application that is running in the foreground consumes the corresponding convenience key event. You can listen for convenience key events by implementing the KeyListener interface.
Device interaction support
You can check whether the BlackBerry device has a slider and what state the slider is by using the Sensor class that is provided in the net.rim.device.api.system package.
If the device has a slider, Sensor.isSupported(Sensor.SLIDE) returns true. If not, the method returns false.
On devices that have a slider, Sensor.getState(Sensor.SLIDE) returns Sensor.STATE_SLIDE_CLOSED, Sensor.STATE_SLIDE_OPEN, or Sensor.STATE_SLIDE_IN_TRANSITION.
You can define a listener to notify your application of changes to the state of the slider by implementing the SensorListener interface.
Detection of device capabilities
You can query the capability of a device by using the Device Capability API that is provided in the net.rim.device.api.system.capability package. The DeviceCapability class allows you to query whether specific features, such as a virtual keyboard or a physical keyboard, are supported on the device, whether the feature is currently available to the BlackBerry device user (for example, if the slider on a device is open and the user can use the physical keyboard), and whether your application can currently access the feature.
You can define a listener to notify your application of changes to the specified capabilities of the device by implementing the DeviceCapabilityListener interface.
Cradle detection and handling
You can detect when a device is connected to a cradle (such as a car kit cradle) by using the DeviceCapability.TYPE_CRADLE capability type that is part of the Device Capability API.
You can use DeviceCapability.isSupported() and DeviceCapability.isAvailable() to detect the cradle status. BlackBerry devices that are running BlackBerry® Device Software 6.0 return true for isSupported(DeviceCapability.TYPE_CRADLE). When a device running BlackBerry Device Software 6.0 is connected to a cradle, isAvailable(DeviceCapability.TYPE_CRADLE) returns true.
When you detect a cradle connection, you can use the new CradleProtocol class to detect the cradle type and properties. CradleProtocol is provided in the net.rim.device.api.accessory package.
You can register your application as a cradle handler. A cradle handler is an application that is a candidate to start when a BlackBerry device is connected to a cradle of a specified type.
To register your application as a cradle handler, use the CradleHandlerRegistry.registerHandler() method. CradleHandlerRegistry is provided in the net.rim.blackberry.api.cradle package. When you register your application, you specify the type of cradle that you want to handle and your application descriptor.
If any handlers are registered for a cradle type, the user is presented with a dialog box when such a cradle is connected. The user can select which handler to use, if any, and the selected handler application is started. The user can also indicate that the selected handler application is automatically started the next time the cradle of the specified type is connected.
The user can change the cradle handler settings on the device by using the Third Party Applications section in Options.
BlackBerry devices that are running BlackBerry Device Software 6.0 and that have a touch screen support pinch gestures. Pinch gestures typically zoom in to and out from of an item.
A pinch begins when two touch points are detected on the touch screen. At that time, a TouchGesture.PINCH_BEGIN event is sent. As the user moves one or both touch points, a series of TouchGesture.PINCH_UPDATE events are sent. When the user completes the gesture, a TouchGesture.PINCH_END event is sent.
You can retrieve the zoom values during the pinch gesture by using the TouchGesture.getPinchMagnitude() method.
You must set the screen property TouchscreenSettings.DETECT_PINCH to enable the detection of pinch gestures on a screen.
Swipe gesture across the trackpad
BlackBerry devices that are running BlackBerry Device Software 6.0 and that have a trackpad support swipe gestures across the trackpad. A TouchGesture.NAVIGATION_SWIPE event is sent when the user swipes across the trackpad. You can retrieve information about the trackpad swipe by using getSwipe methods in the TouchGesture class. You must set the navigation property NavigationDeviceSettings.DETECT_SWIPE to enable the generation of trackpad swipe gestures on a screen.
Touch screen interaction models
BlackBerry devices with a touch screen and a trackpad, such as the BlackBerry Torch 9800 smartphone, use a forceless click interaction model, where the user taps the screen or uses the trackpad to perform an action. This model differs from previous BlackBerry devices with a SurePress touch screen, where the user clicks (presses) the screen to perform an action.
WebKit browser engine
WebKit is an open-source browser engine that is developed by contributors from several different organizations, whose primary focus is on implementing key W3C® and ECMA standards. Non-standard technologies, such as images, media, or functionality that is specific to the BlackBerry device, must be managed by plug-ins or BlackBerry extensions to WebKit.
Graphics and animation
- Quick setup of common animation scenarios
- Scheduling animations to start and stop in response to application and animation events
- Animation groups to contain and manage several animations together
- Blocking and non-blocking animation control
- Common and custom easing curves
You can include high-quality 2-D vector graphics in your applications by using the OpenVG 1.1 API that is provided in the net.rim.device.api.openvg package. The API uses hardware acceleration that can reduce device power consumption and smooth graphics that scale fluidly.
OpenGL ES 1.1
With BlackBerry Java SDK 5.0, you can create 2-D and 3-D hardware-accelerated graphics for your application by using the JSR 239 Java binding for OpenGL ES. With BlackBerry Java SDK 6.0,OpenGL ES 1.1 is supported.
Graphics Utility API and Math API
You can simplify OpenGL ES and OpenVG graphics development and help optimize performance by using the Graphics Utility API and Math API. The APIs are implemented in the net.rim.device.api.opengles, net.rim.device.api.openvg, and net.rim.device.api.math packages and provide the following support:
- Built-in support for OpenGL ES and OpenVG graphics rendering with the VGField and GLField classes.
- Support for creating an OpenVG image from a bitmap, appending path segments and complex polygons to OpenVG paths, computing complex 2-D transformation matrices to apply warps and other special effects to paths or images, and querying OpenVG version information with the VGUtiles class.
- Support for projecting and undoing a production (unprojecting) between 2-D and 3-D spaces, and generating 2-D mipmap textures by using the new methods that are provided in the GLUtils class.
- Support for vector math and bounding volume to assist with viewing frustum culling and testing intersections by using the provided math classes.
You can create superior SVG graphics to display on the device by using the SVG API and JSR 226 enhancements. The runtime on the device now uses an accelerated OpenVG 1.1 based rendering engine resulting in new SVG Tiny™ 1.1 and 1.2 functionality, improved rendering quality, and faster performance.
The SVG API and runtime changes provides the following features:
- Improved fill and stroke painting functionality on linear and radial gradients
- Support for all fill and stroke properties
- High quality anti-aliased path rendering
- High quality image rendering even when the image has been trasnformed in some way
- Improved smooth text rendering and functionality to fill and stroke paints and arbitrary transformations
Random File Access API
You can read data from and write data to a file at any location within the file using the Random File Access API. A new net.rim.device.api.io.Seekable interface is provided in the net.rim.device.api.io package. Two new methods introduced in this interface enable you to get and set the current position within a stream.
You can now develop applications that use the integrated SQLite database using the Database API. You can use the following classes in the net.rim.device.api.database to work with a SQLite database:
For more information on the SQLite API, see the BlackBerry Java Application SQLite Development Guide.
Support to query GPS and geolocation services that are available on the device
You can verify which location sources (internal GPS receiver, external GPS receiver, or geolocation) are supported or available on the BlackBerry device by using the methods available in the LocationInfo class that is provided in the net.rim.device.api.gps package. For example, before you retrieve location data, you can invoke LocationInfo.getSupportedLocationSources() to verify which location sources the device supports.
Geocoding and reverse geocoding enhancements
With BlackBerry® Java® SDK 5.0, you can retrieve information about a location on a map by invoking the Locator.geocode() and Locator.reverseGeocode() methods that are provided in the net.rim.device.api.lbs package. For example, you can use geocoding to retrieve information for a known landmark by using a street address or city. You can use reverse geocoding to find an approximate street address by using the latitudinal and longitudinal coordinates.
With BlackBerry Java SDK 6.0, you can retrieve landmark information by using a postal code or zip code and the Locator.POSTAL_ZIP_CODE constant. This constant returns the postal/zip code, province/state, and country.
GPS mode retrieval
With BlackBerry® Java® SDK 5.0, you can retrieve the default GPS mode by invoking GPSInfo.getDefaultGPSMode() that is provided in the net.rim.device.api.gps package. In BlackBerry Java SDK 6.0, the method returns the modes in the following order: assisted, autonomous, and cell site. The assisted mode is selected as the default mode when assisted GPS mode can be provided to the application without requiring additional credentials from the application.
If you do not specify a GPS mode when you request a location update, the default mode is selected based on the GPS capability that the wireless network supports.
You can retrieve geolocation information from a geolocation service by using the LocationInfo class that is provided in the net.rim.device.api.gps package. The geolocation service provides the approximate location of the BlackBerry device by using the position of cell towers and WLAN access points.
GEOLOCATION_MODE: This mode retrieves a location from among the currently available geolocation sources, based on factors such as network connectivity, location accuracy, and data availability.
GEOLOCATION_MODE_CELL: This mode retrieves a location based on cell tower positioning.
GEOLOCATION_MODE_WLAN: This mode retrieves a location based on WLAN access point positioning.
GPS and geolocation request enhancements
You can request both GPS updates and geolocation updates in parallel by creating two threads and requesting separate instances of the BlackBerryLocationProvider class from each thread. One thread specifies a GPS mode, and the other thread specifies a geolocation mode. For example, you can use this method to provide a BlackBerry device user with an approximate location quickly before a GPS fix is available.
GPS and geolocation optimal fixes
To retrieve an optimal location fix you can request geolocation updates along with GPS updates by using the BlackBerryCriteria.enableGeolocationWithGPS() methods that are provided in the net.rim.device.api.gps package. The optimal fix provides a geolocation fix when a GPS fix cannot be retrieved during the specified timeout period. You can use this feature in an application that requires the location of a BlackBerry device at all times, and you are not concerned with how the location is retrieved.
You can embed a map in an application, add data to a map, display KML overlays, and create static images of a map by using the Maps API that is provided in the net.rim.device.api.lbs.maps package and subpackages.
- Adding your own data to a map, that is rendered directly on the map
- Panning and zooming map views
- Generating static images based on the current map view, including any data on the map
- Adding fields on top of a map, that are not rendered directly on the map
- Allowing BlackBerry device users to navigate through MapField components to other components on the screen
Travel time estimation
You can request the estimated trip duration and trip distance for automobile travel to destinations in the United States and Canada by using the Travel Time API, which is provided in the net.rim.device.api.lbs.travel package. For example, you can create a social networking application that provides the BlackBerry device user's current location and the estimated time of arrival at a friend's location.
The request for a travel time estimate is forwarded to a remote Travel Time server, which plots a route between the starting and ending locations. The Travel Time server uses current and historical traffic information to calculate the estimated trip duration and distance. You can create a request for the estimated trip duration and trip distance by creating an instance of the TravelTimeEstimator class and specifying the geographic coordinates for the starting and ending locations, and the starting time of the trip. You can use the current time or a future time for the starting time of the trip.
You can start and stop the autofocus on the camera by using the EnhancedFocusControl interface that is provided in the net.rim.device.api.amms.control.camera package. With previous versions of the BlackBerry Java SDK, you have limited access to the camera's autofocus by using the FocusControl class that is provided in the javax.microedition.amms.control.camera package. For example, with previous versions you can query if the camera supports autofocus. The EnhancedFocusControl interface extends FocusControl to provide more control over the camera's autofocus.
You can make your data discoverable in searches that are performed through the universal search application on the BlackBerry device and you can integrate search functionality into your application by using the Unified Search API. The Unified Search API is provided in the net.rim.device.api.unifiedsearch package and subpackages.
- The universal search application on the Home screen
- Other applications on the device
- Your application
You can integrate search functionality into your application and permit BlackBerry device users to search other applications that make their data discoverable. You can also permit users to extend their search to an external search provider. An external search provider could be an application that provides its own search functionality, or a networked server on the Internet or behind an organization's firewall. The universal search application on the Home screen displays results from external search providers at the end of search.
Message list enhancements
With BlackBerry Java SDK 4.6, you can create custom messages and folders that your application manages, and that are included in the Messages application on the BlackBerry device, by using the Message List API that is provided in the net.rim.blackberry.api.messagelist package. With BlackBerry Java SDK 6.0, you can display a new-message indicator by using the methods provided in the ApplicationMessageFolder class. For example, you can display the new-message indicator when your application adds new messages to your message folder.
You display a new message by using the new newMessage parameter in the ApplicationMessageFolder.fireElementAdded() method or the hasNewMessages parameter in the ApplicationMessageFolder.fireReset() method. By default, messages that have the UNREAD status are treated as new. You can override this behavior by specifying the parameter as false.
When a BlackBerry device user opens the Messages application, the new-message indicator is cleared and the ApplicationMessageFolderListener indicates that messages are partially viewed by using the new MESSAGE_MARKED_OLD field. Your application should listen for events from the listener so that you can clear the new-message indicator appropriately. You can display or remove the new-message indicator by using the ApplicationIndicator.setNotificationState() method.
With BlackBerry Java SDK 6.0, you can invoke the Messages application and view an application message folder by using the new MessageArguments(folder) constructor, where folder is a registered application message folder.
Personal Information Management (PIM)
Calendar entry: You can update or delete an entry in the Calendar application on the BlackBerry device without sending a notification to the meeting's attendees. (Notifications are always sent to all attendees if a new meeting entry is added, or to new attendees if attendees are added after the last update, to make sure that attendees are notified about a meeting and can accept or decline the meeting.) To update a calendar entry without notifying attendees, you use the BlackBerryPIMItem interface that is provided in the net.rim.blackberry.api.pdap package. For example, when you save the changes to a calendar entry, you can pass in the new BlackBerryEvent.DO_NOT_NOTIFY_ATTENDEES field when you implement BlackBerryPIMItem.commit() so that a notification is not sent. To delete a calendar entry without notifying attendees, pass in the BlackBerryEventList.removeElement() field.
Contact list: You can create and delete contact lists; search for contact information association with a call or phone number; or access a secondary phone number.
Phone screen enhancements
With BlackBerry Java SDK 5.0, you can customize the incoming and the active phone screens on a BlackBerry device to display content about a caller by using the Phone Screen API that is provided in the net.rim.blackberry.api.phone.phonegui package. For example, when a BlackBerry device user receives a call, you can display information about the caller that is provided by your application.
- You can access phone screen objects, the device orientation (portrait or landscape), and the type of phone screen (incoming or active) by using the ScreenModel class. Previously, you used multiple instances of PhoneScreen objects.
- You can make your content look like the default content that the Phone application displays on the incoming and the active phone screens by invoking PhoneScreen.getCallerInfoFont().
- You can easily get the dimensions of a phone screen by invoking PhoneScreen.getDimensions(). With BlackBerry Java SDK 5.0, you invoked this method for each orientation of the phone screen and each type of phone screen.
Support for setting a default content handler
You can register your application as the default handler for a content type by using the DefaultContentHandlerRegistry class that is provided in the net.rim.device.api.content package. For example, you can register your application as the default handler for certain types of documents. If multiple content handlers are registered for a content type, BlackBerry device users can choose the content handler that they want to set as the default content handler.
Network API enhancement
With BlackBerry® Java® SDK 5.0, you can specify how your application opens a connection to a wireless network by using the Network API that is provided in the net.rim.device.api.io.transport and net.rim.device.api.io.transport.options packages. The Network API simplifies how your application opens a connection to a wireless network, and enables you to find the wireless transport types that are available on the BlackBerry device. For example, you can specify an ordered list of transports you want to use to establish a network connection, and let the Network API choose the first available transport.
In BlackBerry Java SDK 6.0, enhancements have been made to the Network API.
Datagram protocol: You can take advantage of UDP by using the network connection functionality that was introduced in BlackBerry Java SDK 5.0. With BlackBerry Java SDK 6.0, calls to the ConnectionFactory.getConnection() method in the net.rim.device.api.io.transport package accept UDP (unicast only) and datagram URLs. This feature is supported only when you use the TRANSPORT_TCP_CELLULAR and TRANSPORT_TCP_WIFI transports.
Detect changes in network transport coverage: You can listen for changes in network transport coverage by implementing the CoverageStatusListener interface. A change in coverage can have several sources, including the addition or deletion of service books, changes to signal strength, transport specific communication requirements, and others.
Detect a default APN: You can check if the default APN is configured for the device in the device's TCP/IP options by using the TcpCellularOptions.isDefaultAPNSet() method in the net.rim.device.api.io.transport.options package.
Your application can communicate with server-side services by using the Communication API. The Communication API is implemented in the net.rim.device.api.io.messaging package. The API provides a communication library on the BlackBerry device that is designed to make it easy to communicate with server-side services such as web services.
Your application can use the Communication API to communicate with other BlackBerry device applications that include the required listeners. For example, your application can use the Communication API to listen for push messages and be notified by a callback when a message arrives.
- Synchronous and asynchronous communications
- Queuing incoming messages until they are processed by an application
- Starting an application in response to an incoming message
- Handling incoming messages as streams
- Authenticating a device
- Using a single application to communicate with multiple endpoints
Message Processing API
You can build, parse, and query network messages in various formats by using the Message Processing API that is provided in the net.rim.device.api.io.parser and org.json packages. You can use the Message Processing API in conjunction with the Communication API to create end-to-end network communications. The Message Processing API supports the following formats: XML, RSS (RDF, Atom), SOAP, and JSON.