Professional Documents
Culture Documents
Contents
1 Introduction...................................................................................................................................................... Marketing your app.......................................................................................................................................... Designing your app........................................................................................................................................... Getting help with Java development................................................................................................................ 2 Java development tools.................................................................................................................................... About the BlackBerry Java plug-in for Eclipse................................................................................................... Simulators......................................................................................................................................................... Code signing keys.............................................................................................................................................. Install the BlackBerry Java Plug-in and the Eclipse IDE..................................................................................... 3 Creating your first BlackBerry Java application................................................................................................ Create the Hello BlackBerry application........................................................................................................... Running your BlackBerry Java application........................................................................................................ Run your application on the BlackBerry Smartphone Simulator............................................................... Run your application on a BlackBerry device............................................................................................ 4 Introducing the Java SDK.................................................................................................................................. Application lifecycle APIs.................................................................................................................................. UI API................................................................................................................................................................ Application integration APIs............................................................................................................................. PIM APIs............................................................................................................................................................ Messaging APIs................................................................................................................................................. Network Connection APIs................................................................................................................................. CLDC Platform and Utilities APIs....................................................................................................................... Device characteristics and BlackBerry infrastructure category........................................................................ Data storage APIs.............................................................................................................................................. Multimedia API................................................................................................................................................. Location-Based Services API............................................................................................................................. Security APIs..................................................................................................................................................... Support for standard Java APIs......................................................................................................................... 5 Find more information...................................................................................................................................... 6 Provide feedback.............................................................................................................................................. 7 Glossary............................................................................................................................................................ 8 Document revision history................................................................................................................................ 3 3 4 5 7 7 7 8 8 9 9 10 10 11 13 13 15 21 26 27 29 30 32 33 34 35 37 39 40 41 42 44
9 Legal notice.......................................................................................................................................................
45
RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.
Introduction
Welcome to BlackBerry Java development. This guide provides all the information you need to get started creating mobile applications for the BlackBerry smartphone. It provides an introduction to the components of the BlackBerry Java SDK, introduces you to the tools you need to develop BlackBerry Java apps, and shows you the basics of BlackBerry Java app development. The BlackBerry smartphone is built from the ground up as a Java-based device, with all built-in apps and APIs written in Java. The BlackBerry Java SDK includes Java ME APIs and BlackBerry-specific APIs. The BlackBerry APIs provide access to advanced UI functionality, deep integration with existing applications, the ability to create databases with SQLite and use cryptographic functions to protect your content, the functionality to embed location-based features (for example, maps and geolocation functionality), and much more. The BlackBerry Java Plug-in for Eclipse includes the BlackBerry Java SDK, and also includes functionality to simplify your development efforts: tools to compile your code into the files you need for BlackBerry deployment, as well as functionality to create apps for multiple versions of BlackBerry device software, debug, and more.
RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.
The Payment Service is an SDK that you can use to collect money in your apps. Your customers can use any of the payment types associated with their BlackBerry ID. Payment types can include billing to their wireless service provider, credit card, or PayPal. The Payment Service server processes all purchase requests. For more information, see: Payment Service Payment Service developer guides and API reference
RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.
In the BlackBerry Java Plug-in for Eclipse, you can package your BlackBerry application project (and its dependent projects) for multiple versions of BlackBerry Device Software. When you distribute your app with BlackBerry Desktop Software or the BlackBerry Enterprise Server push service, the plug-in creates one master .alx file in the Standard folder of your BlackBerry application project. When you distribute your app over the Internet, the plug-in creates the .jad and .cod files for each version of the BlackBerry Device Software in the Web folder of your BlackBerry application project. For more information about packaging application projects for multiple versions, see BlackBerry Java Plug-in for Eclipse developer guides.
For more information about the accelerometer and magnetometer, see BlackBerry Java SDK UI and Navigation Development Guide. For more information about NFC, see: Near Field Communication BlackBerry Java SDK Networking and Connectivity Development Guide
RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.
Fee-based ways you can ask questions: Incident-based support for developers BlackBerry Alliance program
Your question might already be answered. Here is a quick overview of the Java development resources: Developer Resources BlackBerry.com Developer Zone Java getting started page BlackBerry developer blog Knowledge base for Java development Java Development Guides Java Sample Apps Java API Reference
RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.
This section describes the development tools you can use for BlackBerry smartphone application development.
Eclipse is a free, open source development tool. To extend Eclipse for BlackBerry development, RIM provides the BlackBerry Java Plug-in for Eclipse, also free of charge. The plug-in simplifies Java application development for BlackBerry smartphones while giving you access to standard Eclipse tools, such as code assist. The BlackBerry Java Plug-in for Eclipse is the preferred development tool to develop BlackBerry Java applications. However, you can alternatively use Visual Studio or NetBeans as your development environment. The plug-in includes the BlackBerry Java SDK, the BlackBerry Smartphone Simulator, and many sample applications. The plug-in also includes the following development tools: RAPC: You can use this command prompt compiler to compile .java and .jar files into .cod files. Applications on a smart phone must be .cod files. JavaLoader: You can use this tool to add or update an application on a smartphone for testing, and to view information about application .cod files. BlackBerry Signature Tool: You can use this tool to send code signature requests to the BlackBerry Signing Authority Tool. Preverify Tool: You can use this tool to partially verify your classes before you load your application onto a smartphone. JDWP: You can use this tool to debug applications using third-party IDEs.
There are versions of the BlackBerry Java Plug-in for Eclipse for Windows and Macintosh operating systems. If you previously developed BlackBerry Java applications with the BlackBerry JDE, you can import your project into Eclipse with the BlackBerry Java Plug-in for Eclipse. After version 1.1, the BlackBerry Java Plug-in for Eclipse no longer supports project files (.jdp) and workspace files (.jdw) and is not backward compatible with the BlackBerry JDE.
Simulators
When you install the BlackBerry Java Plug-in for Eclipse, simulators are downloaded for all BlackBerry models that are supported by the BlackBerry Device Software that you installed. You can download other simulators for other versions. For more information about simulators, see the BlackBerry Java Plug-in for Eclipse developer guides.
RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.
Specify an empty folder where you want to install the BlackBerry Java Plug-in and the Eclipse IDE. Click Next. On the Select Additional Tasks screen, select where you want the setup application to create shortcuts for the BlackBerry Java Plug-in. 8. Click Next. 9. Review the information on the Pre-installation Summary screen and click Install. 10. Click Done.
RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.
The BlackBerry Java Plug-in for Eclipse 1.3 and later provides templates you can use to create a basic BlackBerry application project. You can customize the code to suit your needs, or you can create an application from scratch by using an empty application template. To get you started, we'll create a version of the "Hello World" application by using the Hello BlackBerry template. This version of "Hello World" is a basic UI application that provides some simple UI components. The application includes an editable text field that allows the BlackBerry device user to type text in a field; in this example, they can type their name. The application also includes a button field. When the BlackBerry device user types their name and clicks the Say Hello to button, the application displays a dialog box with the text Hello <username> as shown in the following screenshot.
RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.
9.
Click Finish.
In the Package Explorer pane, the HelloBlackBerry project appears. The project includes an src folder that contains two Java source files: HelloBlackBerry.java: This file contains the source code for the main section of the application. HelloBlackBerryScreen.java: This file contains the source code for generating the screen.
10
RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.
3.
The BlackBerry Java Plug-in for Eclipse builds and packages the project, and then launches the BlackBerry Smartphone Simulator. By default, the BlackBerry Java Plug-in for Eclipse 1.3 uses the BlackBerry Torch 9800 simulator. On the Home screen of the BlackBerry Smartphone Simulator, click the application icon. In this example, click the Hello BlackBerry icon.
4.
5. 6.
The HelloBlackBerry application opens and displays a screen with an editable text field and a button. To test the Hello BlackBerry application, type your name in the Enter Name field, and then click the Say Hello to button. A dialog box displays with the text Hello <your name> and an OK button. Click OK. To close the application, on the simulator, press the Menu key, and then select Close. To close the simulator, select File > Exit.
RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.
3.
4.
Click BlackBerry > Load Project(s) on Device. The BlackBerry Java Plug-in for Eclipse builds and packages the project. If the BlackBerry device is passwordprotected, you are promted to type the password. The application is loaded on to the device. On the Home screen of the BlackBerry device, click the application icon to run the application.
12
RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.
The BlackBerry Java SDK is divided into twelve categories. Each category consists of APIs that provide a separate type of functionality, such as UI creation, networking, data storage, and security. All twelve categories are described in the following sections.
Regardless of how an application is started, the Application Manager is responsible for starting the process that the application runs within. The ApplicationManager class enables applications to interact with the Application Manager to perform tasks, including: Run an application immediately or at a scheduled time. Interact with processes, including retrieving the IDs for foreground applications. Post global events to the system.
The Application Manager starts an application by getting a new process and spawning a thread within that process to call one of the entry points of the application. For many applications, the main() method of its application class is the single entry point that is called. However, you can configure more than one entry point for an application. Multple entry points allow users to start the app in different ways. For example, if your application allows users to create a new document, you might want to provide users with two icons that they can click to start the application. Users could click one icon to open the application in its home screen and the other icon to open the application in the screen required to create a new document. Application descriptors Application descriptors are sets of data about an application. A single application can have more than one associated application descriptor. An application that has multiple entry points has an application descriptor corresponding to each of those entry points. You can use the ApplicationDescriptor class to work with application descriptors.
13
RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.
public class ListApplications extends UiApplication { StringBuffer strTmp = new StringBuffer(); public static void main(String[] Args) { ListApplications app = new ListApplications(); app.enterEventDispatcher(); } public ListApplications() { ApplicationManager appMgr = ApplicationManager.getApplicationManager(); ApplicationDescriptor[] ad = appMgr.getVisibleApplications(); for(int i=0;i<ad.length;i++) { strTmp.append("Name: "); strTmp.append(ad[i].getName()); strTmp.append('\n'); strTmp.append("Module Name: "); strTmp.append(ad[i].getModuleName()); strTmp.append('\n'); strTmp.append("Version: "); strTmp.append(ad[i].getVersion()); strTmp.append('\n'); strTmp.append('\n'); } this.pushScreen(new InfoScreen(strTmp.toString()));
class InfoScreen extends MainScreen { public InfoScreen(String strMsg) { RichTextField lf = new RichTextField(strMsg); add(lf); } }
From that point on, the application is in an event processing loop. Any listeners you write and register, or are provided for you by the application framework, are called by the event thread in response to corresponding incoming messages. The event thread is the only thread that can process events and update the UI of the application, so you must not use it to run instructions that could fail or take a long time to complete. If, for example, you need to make a network connection, you must spawn and use another thread.
14
RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.
You may encounter situations where you want to update the UI from a non-event thread. There are two ways to do that. You can acquire and synchronize the event lock, causing your thread to act like the event thread; or you can inject an event in the message queue of your application. Synchronize on the event lock if you need to perform a quick or urgent UI update, or inject an event in the message queue if it is acceptable to experience a delay before your task runs. In either case, you should not run tasks that might take a long time to complete or might block. If you use library calls within your task, be sure you understand them well and only use them if they will finish quickly and not block. If you decide to synchronize on the event lock, you must quickly complete the UI update you require and release the lock. Otherwise, your application will become unresponsive and might eventually be terminated by the system. You acquire the event lock by calling Application.getEventLock(). You inject an event in the form of an object that implements Runnable. The event is handled by the event thread as it is received from the message queue. The event thread processes the event by calling its run() method. To inject runnable events in the message queue of your application, use the invokeAndWait() method or the invokeLater() method. Terminating One way to terminate an application is to invoke System.exit(), which causes the BlackBerry JVM to terminate all of the processes of the caller and, as a result, all associated threads. Alternatively, you can terminate an application by popping the last screen off the display stack, which causes the close() method to make a call to System.exit(). It is good practice to manually deregister any listeners you registered before terminating your application. Because you will typically start the event dispatcher thread by calling Application.enterEventDispatcher(), which doesn't terminate, your application should provide a way to terminate. Applications that interact with the user could provide a handler for a Close menu item, and applications that do not interact with the user might terminate upon handling some system event that represents their reason for existence.
UI API
The UI API helps you create user interfaces for BlackBerry screens. The three main UI objects are Screen, Manager, and Field. A screen is the top-level container for the UI elements that represent what you want to display. Screens can contain fields (such as text fields), radio buttons, and dropdown lists. Screens can also contain layout managers, which contain sets of fields. Layout managers are fields themselves, so they can contain other managers. This architecture provides you with a lot of flexibility when designing your UI.
Layout managers
The UI API provides a number of layout managers. The following layout managers are the most commonly used. Even with only these three types of managers, you can create rich layouts in your screens. VerticalFieldManager, which arranges fields in a single vertical column HorizontalFieldManager, which arranges fields in a single horizontal row
15
RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.
Fields
The UI API provides several prebuilt UI components that you can use to display particular types of data in a field. Following are some examples: ButtonField provides a simple button LabelField provides a text label TextField provides a text label DateField allows you to store a date and display it in different formats in a field (such as 2011/11/17) MapField allows you to render a map in a field BrowserField allows you to display web content in a field
In addition to the useful field types that are defined in the UI API, you can create any type of field by extending the
Field class.
elements");
RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.
{ }
// This field can accept the focus, return true. return true;
// Use layout to determine the extent of the field. // Call setExtent(int, int) with the total field size. public void layout(int width, int height) { Font font = getFont(); int _fieldHeight = font.getHeight(); int _fieldWidth = 0; int n = _spaces.length; for (int i = 0; i < n; ++i) { _fieldWidth += _spaces[i]; if (i < n - 1) { _fieldWidth += _buffer; } } setExtent(_fieldWidth, _fieldHeight); } // Use paint to draw text objects to the screen using the // Graphics object that is passed in. This example uses the values // from buffer and spaces[] to determine the location and // size of each segment of text. The ELLIPSIS style // replaces text that is too long for its allocated space // with three dots. public void paint(Graphics graphics) { int xpos = 0; int n = _spaces.length; for (int i = 0; i < n; ++i) { graphics.drawText(_texts[i],xpos,0,graphics.ELLIPSIS,_spaces[i]); xpos += _spaces[i]; if (i < n - 1) { xpos += _buffer; } } }
Layout control
The UIe API includes layout managers that offer flexibility when displaying fields. You declare a layout manager at the top level of your screen and then add fields to it. Because layout managers are subclasses of Field, they can be embedded in other layout managers. You can also define your own layout manager. The following sample code creates a custom layout for a screen.
17
RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.
class LayoutManager extends Manager { public LayoutManager() { // Construct a manager with vertical scrolling. super(Manager.VERTICAL_SCROLL); } // Overwrite the nextFocus method for custom navigation. protected int nextFocus(int direction, boolean alt) { // Retrieve the index of the field that is selected. int index= this.getFieldWithFocusIndex(); if(alt) { if(direction 0){...} else ...} } // If we did not handle it, let the manager's parent class. if (index == this.getFieldWithFocusIndex()) return super.nextFocus(direction, alt); else return index; } protected void sublayout(int width, int height) { Field field; // Get total number of fields within this manager. int numberOfFields = getFieldCount(); int x = 0; int y = 0; for (int i = 0;i < numberOfFields;i++) { field = getField(i); // Get the field. setPositionChild(field,x,y); // Set the position for the field. layoutChild(field, width, height); // Lay out the field. y += ...; ... } setExtent(width, height); } public int getPreferredWidth() { return 160; } public int getPreferredHeight() { int height= 0; int numberOfFields= getFieldCount(); for (int i= 0; i < numberOfFields; i++) { height+= getField(i).getPreferredHeight(); return height; 18
RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.
/**************** Main Class ****************/ ... RichTextField myField = new RichTextField("Hello"); RichTextField myOtherField = new RichTextField("World"); LayoutManager myManager = new LayoutManager(); MainScreen myScreen = new MainScreen(); myScreen.add(myManager); myManager.add(myField); myManager.add(myOtherField);
Screens
The UI API has two main types of Screen objects, PopupScreen and FullScreen. PopupScreen is subclassed by Dialog, Status, LocationPicker, and AbstractLocationPicker. FullScreen is subclassed by MainScreen and PhoneScreen. You can display information that is supplementary to your application in a pop-up screen without interrupting the flow of the application. As a result, you do not have to leave the main screen and then return to it later. In addition, you can prioritize which PopupScreen objects are pushed to the top of the display stack by invoking pushGlobalScreen(Screen, int, int).
Menus
BlackBerry smartphones organize commands on a menu that can be accessed by pressing the Menu key. You can specify the order of menu items and the menu item that is selected by default when the menu opens. In addition, you can add or remove menu items depending on the screen or application state when the menu displays.
Listeners
The UI API offers a flexible implementation of listeners that is based on a more complex organization of components on a screen. The UI API contains a generic event listener model that permits you to implement listeners for many types of events, such as when a field is changed, or when the user presses a key, clicks the trackpad or trackball, or touches the touch screen.
UI application threads
19
RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.
All UI applications that are written using the UI API contain one event dispatcher thread. The thread that invokes Application.enterEventDispatcher() becomes the event dispatcher thread and starts to process events. Using the event dispatcher thread You can add a runnable object to the event queue. Create a class that implements the Runnable interface, and then add the Runnable object to the event queue by using one of the following methods (which are located in the net.rim.device.api.system.Application package): Use invokeAndWait(Runnable runnable) to queue the Runnable object to be called on the event dispatcher thread. This method blocks and does not return until the run() method returns. Use invokeLater(Runnable runnable) to queue the Runnable object to be called on the event dispatcher thread after all pending events are processed. This method returns immediately, instead of blocking until run() returns. Use invokeLater(Runnable runnable, long time, Boolean repeat) to queue the Runnable object to be called on the event dispatcher thread after a specified amount of time. This method returns immediately, instead of blocking until run() returns. The time parameter specifies the number of milliseconds to wait before adding the Runnable object to the event queue. If repeat is true, the Runnable object is added to the event queue every time milliseconds.
Any thread can modify a Screen object before it is pushed on to the display stack or after it is popped off of the display stack. The following code sample updates a screen on the event thread by calling invokeLater(Runnable runnable).
UiApplication.getUiApplication().invokeLater (new { public void run() { //Perform screen changes here. Runnable()
});
//Calling invalidate() on your screen forces the paint method to be called. screenName.invalidate();
Using a background thread with the event lock You can use background threads to access the UI by acquiring the event lock for a short time. Invoke Application.getEventLock() on the background thread to retrieve the event lock, and then synchronize this object to serialize access to the UI. You should only hold this lock for short periods of time because it pauses the event dispatcher thread. An application should never call notify() or wait() while holding the event lock on the background thread.
Modal screens
20
RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.
Screen objects are pushed on to the display stack by the pushScreen() and pushModalScreen() methods of the UiApplication class. Because pushModalScreen() blocks until the screen is popped off the display stack (where pushScreen() returns immediately), the order of operations is crucial when you use modal screens. Do not invoke pushModalScreen() before starting the event dispatcher thread; doing so throws a RuntimeException. Other methods, such as Dialog.inform() and Dialog.alert(), also use pushModalScreen().
Graphics
You have several options for creating graphics on a BlackBerry smartphone: You can add predefined UI components such as text, input controls, and images to Screen objects. You can do simple custom drawing on a screen by overriding the paint() method of the class that represents the screen and using the methods supplied by the Graphics object to draw on the screen. You can draw 2D graphics with the SVG APIs: org.w3c.dom, org.w3c.dom.events, and org.w3c.dom.svg. You can make more sophisticated 2D images using the Graphics Utility API: OpenGL ES API or OpenVG API. You can create 3D images using the OpenGL ES API. BlackBerry Java SDK UI Component Development Guide BlackBerry Java SDK UI and Navigation Development Guide BlackBerry Java SDK UI Design Guidelines BlackBerry Java SDK Graphics and Animation Development Guide
Invoke API
You can use the Invoke API to invoke core applications and optionally pass in data. To use this API, call invokeApplication and pass in the application type and any relevant arguments. You can use the Invoke API to invoke the following core applications: contacts calculator calendar camera BlackBerry Maps memos messages phone search tasks
21
RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.
Invoke contains APP_TYPE fields that enumerate the applications. For each core application that can be invoked with the Invoke API, there is a corresponding subclass of the ApplicationArguments class. For example, to invoke the Phone application, call invokeApplication and pass in the Phone application type and a PhoneArguments argument. To invoke an application with no arguments, pass in null instead of an ApplicationArguments object.
BlackBerry Browser
You can invoke the BlackBerry Browser and open a web page with the methods in the Browser class and the BrowserSession class. For example:
BrowserSession bSession = Browser.getDefaultSession(); bSession.displayPage("http://www.blackberry.com");
For more information about invoking a browser, including how to invoke a browser that is not specified as the default browser, see the Knowledge Base article Invoke the browser. You can also embed web content in your application with the BrowserField class.
Application Manager
You can start a core application with the ApplicationManager class, specifying the code module of the application. Use this technique only if the application cannot be invoked with any of the techniques described above. You cannot pass application arguments to a core application with this technique. You can use ApplicationManager to invoke the following core applications:
22
RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.
Note: The module names for core applications are subject to change. Invoking modules directly can have unintended side-effects.
};
// Register the menu item. ApplicationMenuItemRepository amir = ApplicationMenuItemRepository.getInstance(); amir.addMenuItem(ApplicationMenuItemRepository.MENUITEM_SYSTEM, ami, ad_menuhandler); // ad_menuhandler is an ApplicationDescriptor
23
RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.
The applications that use the ActiveAutoTextEditField or the ActiveRichTextField field (for example, the Calendar and Messages applications) can recognize string patterns and provide specific items for those string patterns in the menu on the smartphone. For example, if a message contains a phone number, the number is highlighted. If the smartphone user selects the number and presses the Menu key, the special menu item Call Number displays. You can define your own string patterns and associate the patterns with custom menu items. The custom menu items display when a user selects a matching string in an ActiveAutoTextEditField or ActiveRichTextField field and opens the menu. The custom menu items can perform any action, such as starting your application. You can use the PatternRepository class to register a Perl-style regular expression or a specific string with the pattern repository on the smartphone. You can use the ApplicationMenuItem class to define a menu item that is associated with the string pattern. For example, the following code sample registers a string pattern and a menu item:
String pattern = [Bb]lack[Bb]erry [Ss]martphone"; int patternType = PatternRepository.PATTERN_TYPE_REGULAR_EXPRESSION; PatternRepository.addPattern(ad_menuhandler, pattern, patternType, new ApplicationMenuItem[] { ami });
For more information about PatternRepository and active text fields, see Active Text Fields sample application. You can register the content handlers that invoke your application by using the Registry class, which is provided in the Content Handler API. When you register a content handler, you can provide an array to specify the actions that invoke the handler. ContentHandler.ACTION_OPEN content handlers for the MIME types that are not supported by the smartphone are used in the BlackBerry Browser, file explorer, and in the Open Attachment menu item in the Messages application. ContentHandler.ACTION_SEND content handlers for the image or video MIME types are used in the file explorer (including in the Media application) and in the Send As menu in the Camera application. The following code sample registers a content handler:
private static void registerApp() { try { // This application is a handler for csv files // and will be invoked with ACTION_OPEN. String[] types = {"text/csv"}; String[] suffixes = {".csv"}; String[] actions = {ContentHandler.ACTION_OPEN}; // Get access to the registry and register as a content handler. // CLASSNAME is the fully qualified name of the application. Registry registry = Registry.getRegistry(CLASSNAME); registry.register(CLASSNAME,types,suffixes,actions,null,ID,null); } catch (ContentHandlerException che) { errorDialog("Registry#register() threw " + che.toString()); 24
RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.
RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.
Embedded web content using the BrowserField class Embedded media players and media recorders using the Mobile Media API (JSR 135), as implemented in javax.microedition.media and javax.microedition.media.control BlackBerry Super Apps BlackBerry Java SDK Super App Development Guide BlackBerry Java SDK Integration Development Guide BlackBerry Java SDK UI and Navigation Development Guide
PIM APIs
The PIM APIs include packages that allow you to access address books, calendars, tasks, and memopads from your application. The BlackBerry smartphone fully supports the J2ME PIM implementation established in JSR 75, and provides a number of custom extensions. The javax.microedition.pim package provides a number of interfaces that allow you to access PIM data on a BlackBerry smartphone. PIM data is organized into PIM lists, items, and fields. PIM lists are databases that contain all PIM items that can be accessed on a smartphone. PIM lists maintain categories, which are logical groupings for the PIM items contained in the list. Each PIMList object can support zero or more categories. Categories are represented by unique String names. A PIMItem object represents a collection of data for a single PIM entry. A PIMItem is a grouping of related fields, with each field consisting of a label, a data type, value(s), and attribute(s). A PIM item is created from a particular PIM list and is associated with that list for the life of the item. A PIM item can have its data imported and exported using standard byte-based formats. Each implementing class defines what formats can be imported and exported for that item. You can launch PIM applications with the BlackBerry Invoke API.
RIM extensions
RIM extensions to J2ME PIM include: Support for multiple calendars, multiple calendar lists, and contact lists Reading and writing to MemoPad Getting and setting recurrence for ToDo items Setting a standard UI for selecting a contact Global Address List (GAL) lookups (for BlackBerry Enterprise Server environments)
26
RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.
Messaging APIs
The Messaging APIs allow you to use messaging functionality in your apps, including emails, application messages, SMS, MMS, and BBM.
Email messages
The packages for email messages are net.rim.blackberry.api.mail and net.rim.blackberry.api.mail.event. To create and send email messages, you set the default Session, retrieve a Store instance, create the email message, and store the email in a retrieved sent folder. Finally, you set up and send the email message. The following sample code creates and sends a text email message.
// Get the Store from the default mail Session. Store store = Session.getDefaultInstance().getStore(); // Retrieve the sent folder. Folder[] folders = store.list(Folder.SENT); Folder sentfolder = folders[0]; // Create a new message and store it in the sent folder. Message msg = new Message(sentfolder); Address recipients[] = new Address[1]; try {
recipients[0]= new Address("user@company.com", "user"); //Add the recipient list to the message. msg.addRecipients(Message.RecipientType.TO, recipients); //Set a subject for the message. msg.setSubject(Test email); //Set the body of the message. msg.setContent("This is a test email from my BlackBerry device"); //Set priority. msg.setPriority(Message.Priority.HIGH); //Send the message. Transport.send(msg);
Application messages
27
RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.
You can use the messagelist package to create application messages. An ApplicationMessage is a custom message that appears in the Messages application and invokes your application when the user opens it or chooses a menu item that you provide for the message.
You can send SMS messages with the javax.wireless.messaging API and the BlackBerry Invoke API. You can't send SMS messages directly from a BlackBerry smartphone that operates on a CDMA network. To receive SMS messages using BlackBerry Java SDK 4.6.0 or later, use the MessageListener interface. If you are using an earlier version of the SDK, use the MessageConnection interface. If you want specific SMS messages to be saved in an SMS message folder, you must specify the folder location using MessageArguments when the SMS message is received by the BlackBerry smartphone. Applications cannot access SMS messages that are stored on the BlackBerry smartphone. To listen for incoming SMS messages that appear in the message list, set the port number argument in Connector.open() to 0 - Connector.open("sms://:0"). MMS messages consist of an MMS header and body. The MMS header consists of address, priority, subject, and delivery information. The MMS body contains the multimedia attachment portion. Sending MMS messages is similar to sending SMS messages, except that you must pass in the MULTIPART_MESSAGE constant when creating the MessageConnection object. To receive MMS messages when using the BlackBerry Java SDK 4.6.0 or later, use the MessageListener interface. If you are using an earlier version of the BlackBerry JDE, use the MessageConnection interface. To listen for incoming MMS messages that appear in the message list, set the selected Connector.open() application ID to 0. In addition to providing notification to applications when messages are received (using the MessageListener interface), you can also configure application notification for outgoing and sent SMS messages and MMS messages. For SMS messages, you can configure your application to track sent SMS messages by passing an instance of a class that implements the OutboundMessageListener interface when invoking MessageConnection.setMessageListener(). Notification using this interface occurs only after the message is sent successfully. If the send operation fails, the application is not notified.
BlackBerry Messenger
28
RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.
BlackBerry Messenger is an instant messaging program that lets BlackBerry smartphone users communicate with each other. BBM is unique among mobile instant messaging applications in that users do not need to sign into or out of the application. As long as smartphones are connected to a wireless network, BBM can keep users connected to their BBM contacts and groups. The BlackBerry Messenger SDK is a separate download from the BlackBerry Java SDK. The BBM SDK, used in conjunction with the BlackBerry Java SDK, lets you develop applications that incorporate social features such as peerto-peer connections between BlackBerry smartphones and integrated chats. For example, in a chess game application, a BlackBerry smartphone user could invite a BBM contact to play a game of chess, and the moves could be communicated back and forth using the BBM platform. There is no need to develop these social features yourself, and no server-side development is required to support them. For more information about BBM, see the BlackBerry Messenger Social Platform SDK developer guides.
Network API
The Network API is designed to make it easy to create HTTP, HTTPS, Socket, TLS, SSL, UDP, and Datagram connections. It includes classes for the two main tasks involved in creating a network connection: probe: TransportInfo class connect: ConnectionFactory class
You can use the TransportInfo.getAvailableTransportTypes() method to determine which transport types are supported by a smartphone. You can then use the TransportInfo.isTransportAvailable() method to determine whether the smartphone is currently capable of using the supplied transport type. Finally, you can test the coverage of the transport type by using TransportInfo.hasSufficientCoverage(). After that sequence of probing calls, you know what transports are available and whether the smartphone is in coverage for your transport of choice. The Network API does not make connection creation thread-safe. Your application will lock if you call ConnectionFactory.getConnection() on the event thread. When calling this method to create a connection, create a non-event thread.
29
RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.
The simplest way to use the ConnectionFactory class to create a connection is to call the ConnectionFactory.getConnection() method, specifying only the URL to connect to. The method will return a ConnectionDescriptor object from which you can call ConnectionDescriptor.getConnection() to retrieve a Connection object that you can cast to an appropriate subobject. The BlackBerry solution also enables server-side applications to proactively push data to BlackBerry smartphones in a secure and reliable manner.
30
RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.
java.lang provides the core Java classes java.lang.ref provides support for weak references (references that do not protect objects from garbage collection) java.util provides the standard collection classes (Hashtable, Stack, and Vector) and date/time support
The RIM provided packages in the CLDC Platform and Utilities category are:
31
RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.
Web-service and XML-related packages: net.rim.device.api.xml, net.rim.device.api.xml.jaxp, and net.rim.device.api.xml.parsers Collections-related packages: net.rim.device.api.collection, net.rim.device.api.collection.util, and net.rim.device.api.util Math and other utilities: net.rim.device.api.math and net.rim.device.api.util J2ME Web Services (Sun white paper)
Device characteristics
There are some general mechanisms you can use to query information about a smartphone. You can use System.getProperty() to get information about many smartphone characteristics, including whether the device supports audio mixing and what time zone is currently set on the device. Beginning with BlackBerry Java SDK 6.0, you can use the DeviceCapability class to query information about a smartphone. The class indicates whether covered capabilites are supported, allowed, or available. The following classes, mostly in the net.rim.device.api.system package, provide methods to obtain information about a device:
32
AccelerometerSensor Audio Backlight BluetoothSerialPort Branding CDMAInfo DeviceInfo Display GPRSInfo GPSInfo LED Memory OwnerInfo RadioInfo Sensor SIMCardInfo
RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.
USBPort
BlackBerry infrastructure
BlackBerry infrastructure includes the BlackBerry Enterprise Server (including IT policies and application control policies) and the BlackBerry Internet Service. In the BlackBerry Java SDK, infrastructure includes the following packages: Push Service: net.rim.blackberry.api.push provides an efficient and reliable way of sending information to your users, as well as a way to let your application process information in the background and notify users when their attention is required. Service book: net.rim.device.api.servicebook allows your application to interact with the service book. For example, you can use a service record to keep of multiple email connections or to search for individual emails within an email hierarchy based on the email item's content ID. Device Characteristics and BlackBerry Infrastructure category overview BlackBerry Enterprise Server
The following table compares the features of each approach: Features Data format Storage locations File system Any Application storage, external media card, built-in media storage SQLite Persistent store database Relational Java object database file External Application media card, storage built-in media storage Runtime store Java object Application storage Record store Serialized Application storage
33
RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.
File system Size of partitions the user has access to 4.2 or later (FileConnection API) Yes
SQLite database Size of partitions the user has access to 5.0 or later
All
3.6 or later
Yes Yes
Yes Yes
No Yes
Yes Yes
Following are some considerations for choosing a data storage approach: The file system and SQLite databases are typically the most efficient storage location for large, read-only files such as videos or large graphics. Memory on wireless smartphones can be very limited, so you should consider not storing all data on the smartphone. BlackBerry smartphones are frequently connected so your application can access data when needed. In many cases, the best approach is to store data across smartphone restarts only for data that is frequently accessed. When you consider where to store essential data, keep in mind that microSD cards can be removed. There is more latency in writing to application storage than there is in reading from it. For example, reading from the persistent store is relatively fast while commits are relatively slow. The file system and record store are standards-based approaches, while the persistent store and runtime store are specific to BlackBerry smartphones. If you want your application to run on other Java ME compatible devices, you should consider a standards-based approach. BlackBerry Java SDK Data Storage Development Guide
Multimedia API
The Multimedia API allows you to play and record audio and video. This API is the the MIDP 2.0 Media API, provided in the javax.microedition.media package. To record and play media in your app, use the Player class. To create an instance of a Player class, invoke createPlayer() in the javax.microedition.media.Manager class. When the Player is first created using one of the createPlayer() methods, it is in an UNREALIZED state. Before you can have access to the associated metadata or controls for the Player, you must invoke the Player object's realize() method. This method transitions the Player to a REALIZED state.
34
RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.
In the REALIZED state, the Player class provides access to associated resources that control playback and recording. You can use the Player object's getControl() and getControls() methods (inherited from Controllable), passing in a String specifying the Control object that you require. You can find the available controls for your media player in the javax.microedition.media.control package. Before your application closes, you must invoke the Player object's close() method to deallocate any resources the Player has created. You can also do this at any time to free up memory or resources. After you invoke close(), you can no longer use the Player.
Finding a location
You can retrieve location information for a BlackBerry smartphone by using one of the following services: GPS: Provides location information using GPS satellites. You can retrieve GPS location information using the JSR 179 Location API in the javax.microedition.location package or the BlackBerry extensions to JSR 179 in the net.rim.device.api.gps package. Geolocation: Provides location information using cell tower positioning and WLAN access points. You do not require GPS technology on the smartphone to use the geolocation service. Geolocation is useful for applications that require an approximate location and that can be used indoors (for example, applications that recommend local points of interest). You can retrieve geolocation using the net.rim.device.api.gps package. Geocoding and reverse geocoding: Provides geospatial coordinates for a street address (geocoding), and provides a street address for geospatial coordinates (reverse geocoding).
RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.
Control the behavior of the map Create custom shapes and objects, and display them Display mappable objects that can be updated dynamically as information changes Add fields and overlays to the map Customize the look and feel of the map
Your application can interact with BlackBerry Maps in the following ways: Invoke BlackBerry Maps from your application using the Invoke.invokeApplication() method with MapsArguments parameters. You can display the following: a location for an address in the Contacts application a location for a landmark a location at specific coordinates a location or route by using a location document a locations by using local search information a KML overlay Open BlackBerry Maps from the BlackBerry Browser
You can create a location picker dialog box that allows a user to choose a location from a list of available selections that you define. You can define the location picker dialog box with the Location Picker API, which is provided in the net.rim.device.api.lbs.picker package. The location is passed using a javax.microedition.location.Landmark object.
Performing geofencing
You can use the Geofence class that is provided in the net.rim.device.api.location package to define geofenced areas and receive notifications when a BlackBerry smartphone user enters or leaves the specified area. A geofence is a virtual geographic area of interest that you can define by a radius around a location, or by coordinates that define a polygon for the location. Your application must instantiate a Geofence object and implement the GeofenceListener to receive notifications for geofencing events (when a user enters or exits geofenced areas). Each instance of Geofence can process up to 20 monitored areas concurrently.
RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.
Location-Based Services category overview BlackBerry Java SDK Location-Based Services Development Guide
Security APIs
The Security APIs include the RIM Cryptographic API and Content Protection.
Keystore API: A key store is a database that stores cryptographic keys and certificates. Each BlackBerry smartphone has a key store that is preloaded with root certificates for all of the certificate authorities. This practice makes it possible for BlackBerry smartphone users to trust the root certificates, which form the basis for all subsequent chains of trust. Key store classes are provided in the net.rim.device.api.crypto.keystore package. Certificate API: Certificates are electronic documents that hold keys, along with identifying information. There are several packages to help you manage cryptographic certificates:
net.rim.device.api.crypto.certificate net.rim.device.api.crypto.certificate.status net.rim.device.api.crypto.certificate.x509 javax.microedition.pki net.rim.device.api.crypto.certificate.wtls
37
RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.
Encoder API: Encoding is the process of converting data from one format to another. While it is often part of the encryption process, encoding is not the same as encryption and is generally not secure. Keys are encoded to provide a standard representation, not to protect their identity. Classes for encoding keys and signatures are provided in the net.rim.device.api.crypto.encoder package. ASN1 API: Most applications use certificates that are produced by a certificate authority. If you need to parse or read certificates yourself, you must use the net.rim.device.api.crypto.asn1 package. OID API: Object identifiers are managed with the net.rim.device.api.crypto.oid package. Primitives API: Cryptographic primitives are the keys, MACs, ciphers, unkeyed algorithms such as digests and PRNGs, and other functionality associated with both symmetric and public key cryptography. Cryptographic primitives are provided in the net.rim.device.api.crypto package.
Content Protection
Content protection addresses the problem of someone stealing a smartphone and copying its data, which may be possible even when data is encrypted and the smartphone is locked. Content protection encrypts data in such a way that the encryption key is inaccessible when the smartphone is locked. There are three parts to a content protection implementation: There is content protection functionality on every BlackBerry smartphone. To use it, the smartphone must have a device password, and content protection must be enabled by the smartphone user or by an IT policy rule. To protect data in an application, the application must subscribe to the content protection framework by registering a listener. Content protection functionality is triggered by the user locking and unlocking the smartphone.
Content protection can be used to encrypt data in String objects or byte arrays. Content protection can apply to data that is not persisted, but the Content Protection API contains specific functionality for the persistent store. The following classes and interfaces are used to implement content protection: net.rim.device.api.system.PersistentContent: This class contains utility methods for encoding and decoding data, registering listeners, and performing other tasks related to content protection. net.rim.device.api.system.PersistentContentListener: This listener interface lets your application receive notifications when there are changes toa smartphone's content protection state or content protection settings. net.rim.device.api.system.PersistentContentException: This exception is thrown when an error occurs with content protection. BlackBerry Java SDK Security Development Guide Cryptography category overview
38
RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.
39
RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.
www.blackberry.com/go/devdocs: Find development guides, release notes, API references and sample application overviews for the various BlackBerry application development approaches. www.blackberry.com/go/apiref: View the latest version of the API reference for the BlackBerry Java SDK. www.blackberry.com/developers: Visit the BlackBerry Developer Zone for resources on developing BlackBerry device applications. www.blackberry.com/go/developerkb: View knowledge base articles on the BlackBerry Development Knowledge Base. www.blackberry.com/developers/downloads: Find the latest development tools and downloads for developing BlackBerry device applications.
40
RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.
Provide feedback
To provide feedback on this deliverable, visit www.blackberry.com/docsfeedback.
41
RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.
Glossary
AES Advanced Encryption Standard
BlackBerry transport layer encryption BlackBerry transport layer encryption (formerly known as standard BlackBerry encryption) uses a symmetric key encryption algorithm to help protect data that is in transit between a BlackBerry device and the BlackBerry Enterprise Server when the data is outside an organization's firewall. BlackBerry Enterprise Server environment A BlackBerry Enterprise Server environment consists of one or more BlackBerry Domain instances, a messaging server, and any third-party software and hardware that the BlackBerry Enterprise Server components interact with. certificate A certificate is a digital document that binds the identity and public key of a certificate subject. Each certificate has a corresponding private key that is stored separately. A certificate authority signs the certificate to indicate that it is authentic and can be trusted. CLDC Connected Limited Device Configuration code-signing keys Code-signing keys are the keys that are stored on media cards that sign files so that a user can install and run the files on a BlackBerry device. content protection Content protection helps protect user data on a locked BlackBerry device by encrypting the user data using the content protection key and ECC private key. HTTPS Hypertext Transfer Protocol over Secure Sockets Layer IT policy An IT policy consists of various IT policy rules that control the security features and behavior of BlackBerry smartphones, BlackBerry PlayBook tablets, the BlackBerry Desktop Software, and the BlackBerry Web Desktop Manager. IT policy rule An IT policy rule permits you to customize and control the actions that BlackBerry smartphones, BlackBerry PlayBook tablets, the BlackBerry Desktop Software, and the BlackBerry Web Desktop Manager can perform. JDK
42
RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.
Java Development Kit JVM Java Virtual Machine Java ME Java Platform, Micro Edition MIDP Mobile Information Device Profile S/MIME Secure Multipurpose Internet Mail Extensions TCP/IP Transmission Control Protocol/Internet Protocol (TCP/IP) is a set of communication protocols that is used to transmit data over networks, such as the Internet. WAP Wireless Application Protocol WTLS Wireless Transport Layer Security
43
RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.
44
RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.
Legal notice
2011 Research In Motion Limited. All rights reserved. BlackBerry, RIM, Research In Motion, and related trademarks, names, and logos are the property of Research In Motion Limited and are registered and/or used in the U.S. and countries around the world. Bluetooth is a trademark of Bluetooth SIG. Eclipse is a trademark of Eclipse Foundation, Inc. Facebook is a trademark of Facebook, Inc. GSM is a trademark of the GSM MOU Association. Intel and Pentium are trademarks of Intel Corporation. Java, JavaScript, and NetBeans are trademarks of Oracle America, Inc. OpenGL is a trademark of Silicon Graphics, Inc. OpenVG is a trademark of Khronos Group Inc. SQLite is a trademark of Hipp, Wyrick & Company, Inc. SVG Tiny is a trademark of W3C. Twitter is a trademark of Twitter, Inc. Wi-Fi is a trademark of the Wi-Fi Alliance. All other trademarks are the property of their respective owners. This documentation including all documentation incorporated by reference herein such as documentation provided or made available at www.blackberry.com/go/docs is provided or made accessible "AS IS" and "AS AVAILABLE" and without condition, endorsement, guarantee, representation, or warranty of any kind by Research In Motion Limited and its affiliated companies ("RIM") and RIM assumes no responsibility for any typographical, technical, or other inaccuracies, errors, or omissions in this documentation. In order to protect RIM proprietary and confidential information and/or trade secrets, this documentation may describe some aspects of RIM technology in generalized terms. RIM reserves the right to periodically change information that is contained in this documentation; however, RIM makes no commitment to provide any such changes, updates, enhancements, or other additions to this documentation to you in a timely manner or at all. This documentation might contain references to third-party sources of information, hardware or software, products or services including components and content such as content protected by copyright and/or third-party web sites (collectively the "Third Party Products and Services"). RIM does not control, and is not responsible for, any Third Party Products and Services including, without limitation the content, accuracy, copyright compliance, compatibility, performance, trustworthiness, legality, decency, links, or any other aspect of Third Party Products and Services. The inclusion of a reference to Third Party Products and Services in this documentation does not imply endorsement by RIM of the Third Party Products and Services or the third party in any way. EXCEPT TO THE EXTENT SPECIFICALLY PROHIBITED BY APPLICABLE LAW IN YOUR JURISDICTION, ALL CONDITIONS, ENDORSEMENTS, GUARANTEES, REPRESENTATIONS, OR WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY CONDITIONS, ENDORSEMENTS, GUARANTEES, REPRESENTATIONS OR WARRANTIES OF DURABILITY, FITNESS FOR A PARTICULAR PURPOSE OR USE, MERCHANTABILITY, MERCHANTABLE QUALITY, NON-INFRINGEMENT, SATISFACTORY QUALITY, OR TITLE, OR ARISING FROM A STATUTE OR CUSTOM OR A COURSE OF DEALING OR USAGE OF TRADE, OR RELATED TO THE DOCUMENTATION OR ITS USE, OR PERFORMANCE OR NON-PERFORMANCE OF ANY SOFTWARE, HARDWARE, SERVICE, OR ANY THIRD PARTY PRODUCTS AND SERVICES REFERENCED HEREIN, ARE HEREBY EXCLUDED. YOU MAY ALSO HAVE OTHER RIGHTS THAT VARY BY STATE OR PROVINCE. SOME JURISDICTIONS MAY NOT ALLOW THE EXCLUSION OR LIMITATION OF IMPLIED WARRANTIES AND CONDITIONS. TO THE EXTENT PERMITTED BY LAW, ANY IMPLIED WARRANTIES OR CONDITIONS RELATING TO THE DOCUMENTATION TO THE EXTENT THEY CANNOT BE EXCLUDED AS SET OUT ABOVE, BUT CAN BE LIMITED, ARE HEREBY LIMITED TO NINETY (90) DAYS FROM THE DATE YOU FIRST ACQUIRED THE DOCUMENTATION OR THE ITEM THAT IS THE SUBJECT OF THE CLAIM.
45
RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW IN YOUR JURISDICTION, IN NO EVENT SHALL RIM BE LIABLE FOR ANY TYPE OF DAMAGES RELATED TO THIS DOCUMENTATION OR ITS USE, OR PERFORMANCE OR NONPERFORMANCE OF ANY SOFTWARE, HARDWARE, SERVICE, OR ANY THIRD PARTY PRODUCTS AND SERVICES REFERENCED HEREIN INCLUDING WITHOUT LIMITATION ANY OF THE FOLLOWING DAMAGES: DIRECT, CONSEQUENTIAL, EXEMPLARY, INCIDENTAL, INDIRECT, SPECIAL, PUNITIVE, OR AGGRAVATED DAMAGES, DAMAGES FOR LOSS OF PROFITS OR REVENUES, FAILURE TO REALIZE ANY EXPECTED SAVINGS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, LOSS OF BUSINESS OPPORTUNITY, OR CORRUPTION OR LOSS OF DATA, FAILURES TO TRANSMIT OR RECEIVE ANY DATA, PROBLEMS ASSOCIATED WITH ANY APPLICATIONS USED IN CONJUNCTION WITH RIM PRODUCTS OR SERVICES, DOWNTIME COSTS, LOSS OF THE USE OF RIM PRODUCTS OR SERVICES OR ANY PORTION THEREOF OR OF ANY AIRTIME SERVICES, COST OF SUBSTITUTE GOODS, COSTS OF COVER, FACILITIES OR SERVICES, COST OF CAPITAL, OR OTHER SIMILAR PECUNIARY LOSSES, WHETHER OR NOT SUCH DAMAGES WERE FORESEEN OR UNFORESEEN, AND EVEN IF RIM HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW IN YOUR JURISDICTION, RIM SHALL HAVE NO OTHER OBLIGATION, DUTY, OR LIABILITY WHATSOEVER IN CONTRACT, TORT, OR OTHERWISE TO YOU INCLUDING ANY LIABILITY FOR NEGLIGENCE OR STRICT LIABILITY. THE LIMITATIONS, EXCLUSIONS, AND DISCLAIMERS HEREIN SHALL APPLY: (A) IRRESPECTIVE OF THE NATURE OF THE CAUSE OF ACTION, DEMAND, OR ACTION BY YOU INCLUDING BUT NOT LIMITED TO BREACH OF CONTRACT, NEGLIGENCE, TORT, STRICT LIABILITY OR ANY OTHER LEGAL THEORY AND SHALL SURVIVE A FUNDAMENTAL BREACH OR BREACHES OR THE FAILURE OF THE ESSENTIAL PURPOSE OF THIS AGREEMENT OR OF ANY REMEDY CONTAINED HEREIN; AND (B) TO RIM AND ITS AFFILIATED COMPANIES, THEIR SUCCESSORS, ASSIGNS, AGENTS, SUPPLIERS (INCLUDING AIRTIME SERVICE PROVIDERS), AUTHORIZED RIM DISTRIBUTORS (ALSO INCLUDING AIRTIME SERVICE PROVIDERS) AND THEIR RESPECTIVE DIRECTORS, EMPLOYEES, AND INDEPENDENT CONTRACTORS. IN ADDITION TO THE LIMITATIONS AND EXCLUSIONS SET OUT ABOVE, IN NO EVENT SHALL ANY DIRECTOR, EMPLOYEE, AGENT, DISTRIBUTOR, SUPPLIER, INDEPENDENT CONTRACTOR OF RIM OR ANY AFFILIATES OF RIM HAVE ANY LIABILITY ARISING FROM OR RELATED TO THE DOCUMENTATION. Prior to subscribing for, installing, or using any Third Party Products and Services, it is your responsibility to ensure that your airtime service provider has agreed to support all of their features. Some airtime service providers might not offer Internet browsing functionality with a subscription to the BlackBerry Internet Service. Check with your service provider for availability, roaming arrangements, service plans and features. Installation or use of Third Party Products and Services with RIM's products and services may require one or more patent, trademark, copyright, or other licenses in order to avoid infringement or violation of third party rights. You are solely responsible for determining whether to use Third Party Products and Services and if any third party licenses are required to do so. If required you are responsible for acquiring them. You should not install or use Third Party Products and Services until all necessary licenses have been acquired. Any Third Party Products and Services that are provided with RIM's products and services are provided as a convenience to you and are provided "AS IS" with no express or implied conditions, endorsements, guarantees, representations, or warranties of any kind by RIM and RIM assumes no liability whatsoever, in relation thereto. Your use of Third Party Products and Services shall be governed by and subject to you agreeing to the terms of separate licenses and other agreements applicable thereto with third parties, except to the extent expressly covered by a license or other agreement with RIM.
46
RIM Confidential and Proprietary Information - Beta Customers Only. Content and software are subject to change.
Certain features outlined in this documentation require a minimum version of BlackBerry Enterprise Server, BlackBerry Desktop Software, and/or BlackBerry Device Software. The terms of use of any RIM product or service are set out in a separate license or other agreement with RIM applicable thereto. NOTHING IN THIS DOCUMENTATION IS INTENDED TO SUPERSEDE ANY EXPRESS WRITTEN AGREEMENTS OR WARRANTIES PROVIDED BY RIM FOR PORTIONS OF ANY RIM PRODUCT OR SERVICE OTHER THAN THIS DOCUMENTATION. Research In Motion Limited 295 Phillip Street Waterloo, ON N2L 3W8 Canada Research In Motion UK Limited Centrum House 36 Station Road Egham, Surrey TW20 9LF United Kingdom Published in Canada
47