JDE 5.0 IntegrationGuide-Beta
JDE 5.0 IntegrationGuide-Beta
JDE 5.0 IntegrationGuide-Beta
Integration
Version: 5.0
Development Guide
Published: 2010-04-06
SWD-761936-0406015514-001
Contents
1 Integrating with BlackBerry Device Software applications.................................................................................................. 5
Invoke a BlackBerry Device Software application....................................................................................................................... 5
2 Message list.................................................................................................................................................................................. 6
Create a new blank SMS text message........................................................................................................................................ 6
Create a new populated text message......................................................................................................................................... 6
Create a new blank MMS message............................................................................................................................................... 7
Create a new blank email message.............................................................................................................................................. 7
Create a new populated email message...................................................................................................................................... 7
Create a new blank PIN message................................................................................................................................................. 8
Create a new populated PIN message......................................................................................................................................... 8
Receive a message notification..................................................................................................................................................... 8
Add a listener to the message store............................................................................................................................................. 9
Add a listener to the message store for batch updates.............................................................................................................. 10
Add a listener to a folder................................................................................................................................................................ 10
Retrieve the total count of unread email messages in all folders in the store........................................................................ 10
Open a message............................................................................................................................................................................. 11
Retrieving the body of an email message.................................................................................................................................... 12
Retrieve the plain text and HTML content in the body of an email message using a recursive method.................... 12
Retrieve the plain text content of an email message......................................................................................................... 15
Retrieve the HTML content of an email message............................................................................................................... 16
Notify a BlackBerry device application that an email message is about to be sent............................................................... 18
Notify a BlackBerry device application that an MMS message is about to be sent................................................................ 19
Notify a BlackBerry device application that an SMS message is about to be sent................................................................. 20
Send a message.............................................................................................................................................................................. 20
Reply to a message......................................................................................................................................................................... 22
Forward a message......................................................................................................................................................................... 23
Work with message folders............................................................................................................................................................ 24
3 Attachments................................................................................................................................................................................. 26
Create an attachment handler...................................................................................................................................................... 26
Retrieve the contents of an attachment...................................................................................................................................... 27
Retrieve information about an attachment................................................................................................................................. 27
Send a message with an attachment........................................................................................................................................... 27
Download attachments automatically.......................................................................................................................................... 28
4 Calendar........................................................................................................................................................................................ 30
Open the calendar.......................................................................................................................................................................... 30
View or change a calendar entry.................................................................................................................................................. 30
Open a new populated calendar entry......................................................................................................................................... 31
Update calendar entry information.............................................................................................................................................. 31
Retrieve calendar entry information............................................................................................................................................. 34
Export a calendar entry.................................................................................................................................................................. 35
Import a calendar entry.................................................................................................................................................................. 35
Retrieve multiple lists of calendar entries.................................................................................................................................... 36
Notify a BlackBerry device application when a list of calendar entries changes.................................................................... 36
Notify a BlackBerry device application when the default list of calendar entries changes................................................... 37
5 Contact list................................................................................................................................................................................... 38
Multiple contact lists support........................................................................................................................................................ 38
Open the contacts application...................................................................................................................................................... 38
Open the contacts application by using contact data............................................................................................................... 39
Open the contacts application with a specific contact list........................................................................................................ 40
Create a contact and assign it to a contact list........................................................................................................................... 41
Retrieve contact information......................................................................................................................................................... 42
Retrieve a contact list UID............................................................................................................................................................. 43
Export a contact.............................................................................................................................................................................. 44
Import a contact.............................................................................................................................................................................. 45
Delete a contact.............................................................................................................................................................................. 45
Notify an application when a contact list changes..................................................................................................................... 46
Linking third-party contacts with contacts in the contacts application................................................................................... 48
Link a contact.......................................................................................................................................................................... 48
Remove a link.......................................................................................................................................................................... 49
Creating menu items for linked contacts............................................................................................................................ 50
Create menu items for linked contacts................................................................................................................................ 51
Create a custom field for linked contacts............................................................................................................................ 52
6 Task list......................................................................................................................................................................................... 54
View or change a task.................................................................................................................................................................... 54
Create a new blank task................................................................................................................................................................. 54
Create a new populated task......................................................................................................................................................... 54
Open a task list............................................................................................................................................................................... 55
Create a task.................................................................................................................................................................................... 55
Add task information...................................................................................................................................................................... 56
Change task information................................................................................................................................................................ 57
Save a task....................................................................................................................................................................................... 57
Retrieve task information............................................................................................................................................................... 57
Export a task.................................................................................................................................................................................... 58
Import a task.................................................................................................................................................................................... 59
Delete a task.................................................................................................................................................................................... 59
Close the task list............................................................................................................................................................................ 60
Notify a BlackBerry device application when a list of tasks changes....................................................................................... 60
7 Phone............................................................................................................................................................................................. 61
Making a call from a BlackBerry device application................................................................................................................... 61
Make a call from a BlackBerry device application (single-line environment)......................................................................... 61
Make a call from a BlackBerry device application (multi-line environment)........................................................................... 61
Add DTMF tones to the send queue............................................................................................................................................. 62
BlackBerry DTMF tones.................................................................................................................................................................. 62
Listen for and handle phone events............................................................................................................................................. 63
Listen for and handle multi-line events....................................................................................................................................... 63
Retrieve call information by using call logs................................................................................................................................. 64
Retrieve a call participant.............................................................................................................................................................. 65
Retrieve call information................................................................................................................................................................ 65
Retrieve the phone number of a BlackBerry device.................................................................................................................... 65
Retrieve a call by call ID................................................................................................................................................................. 66
Displaying content on a phone screen......................................................................................................................................... 66
Display content on a phone screen.............................................................................................................................................. 67
8 BlackBerry Browser..................................................................................................................................................................... 68
Retrieve a BlackBerry Browser session......................................................................................................................................... 68
Retrieve a non-default BlackBerry Browser session................................................................................................................... 68
Request a web page........................................................................................................................................................................ 68
Enhanced support for web content in BlackBerry device applications.................................................................................... 68
Display HTML content in a browser field............................................................................................................................ 69
Display HTML content from a web page in a browser field.............................................................................................. 70
Display HTML content from a resource in your application.............................................................................................. 71
Configure a browser field...................................................................................................................................................... 72
Send form data to a web address in a browser field.......................................................................................................... 73
9 Menu items................................................................................................................................................................................... 75
Adding menu items to BlackBerry Device Software applications............................................................................................. 75
Create and register a menu item.................................................................................................................................................. 75
10 Glossary......................................................................................................................................................................................... 77
11 Provide feedback......................................................................................................................................................................... 79
13 Legal notice.................................................................................................................................................................................. 82
Development Guide Integrating with BlackBerry Device Software applications
For more information about using the net.rim.blackberry.api.invoke.Invoke class, see the API reference for the
BlackBerry® Java® Development Environment.
5
Development Guide Message list
Message list 2
This section describes how to use the messaging capabilities of the BlackBerry® device.
For more information, see the Messaging category overview in the API reference for the BlackBerry® Java® Development
Environment.
6
Development Guide Create a new blank MMS message
7
Development Guide Create a new blank PIN message
8
Development Guide Add a listener to the message store
import net.rim.blackberry.api.mail.event.FolderListener;
import net.rim.blackberry.api.mail.event.StoreListener;
import net.rim.device.api.system.ControlledAccessException;
2. Implement the FolderListener and StoreListener interfaces.
public class MailTest implements FolderListener, StoreListener { ... }
3. Check for a ControlledAccessException if your application accesses an object that you do not have permission to
access.
}
catch (NoSuchServiceException e)
{
System.out.println(e.toString());
}
3. Within the try-catch block, invoke Session.waitForDefaultSession().getStore() to retrieve the Store
object.
try
{
Store store = Session.waitForDefaultSession().getStore();
}
catch (NoSuchServiceException e)
{
System.out.println(e.toString());
}
4. After the try-catch block, invoke store.addStoreListener() to add a StoreListener instance to the Store
object.
store.addStoreListener(this);
9
Development Guide Add a listener to the message store for batch updates
Retrieve the total count of unread email messages in all folders in the store
1. Import the required class.
import net.rim.blackberry.api.mail.Store;
10
Development Guide Open a message
2. Invoke Store.getUnreadMessageCount().
int numUnread = store.getUnreadMessageCount();
Open a message
1. Import the required classes and interfaces.
import java.util.Date;
import net.rim.blackberry.api.mail.Address;
import net.rim.blackberry.api.mail.Folder;
import net.rim.blackberry.api.mail.Message;
import net.rim.blackberry.api.mail.Session;
import net.rim.blackberry.api.mail.Store;
2. Invoke Session.waitForDefaultSession.getStore() to retrieve the message store.
Store store = Session.waitForDefaultSession.getStore();
3. Invoke Store.getFolder() to retrieve the folder that contains the message.
Folder folder = Store.getFolder("SampleFolder");
4. Invoke folder.getMessages() to retrieve the message objects and store the message objects in a Message array.
Iterate through the array and retrieve information, such as the sender and subject, to display to the BlackBerry® device user.
Message[] msgs = folder.getMessages();
5. When a user selects a message from the list, invoke methods on the Message object to retrieve the appropriate fields and
body contents to display to the user.
Message msg = msgs[0]; // Retrieve the first message
Address[] recipients = msg.getRecipients(Message.RecipientType.TO);
Date sent = msg.getSentDate();
Address from = msg.getFrom();
String subject = msg.getSubject();
Object o = msg.getContent();
//...
6. Invoke Message.getBodyText() on a message to retrieve the plain text contents as a String. If the message does
not contain plain text, the method returns null.
11
Development Guide Retrieving the body of an email message
For example, you might retrieve the content of an email message to translate the content into a different language.
Support for text and HTML was introduced in BlackBerry® Device Software 4.5 for BlackBerry devices associated with BlackBerry®
Enterprise Server 4.1 Service Pack 6 (4.1.6) or the BlackBerry® Internet Service 2.5.
Retrieve the plain text and HTML content in the body of an email message using a recursive
method
Create a recursive method to retrieve all the parts of the body of an email message including plain text and HTML.
12
Development Guide Retrieving the body of an email message
9. If the BodyPart is an attachment that the BlackBerry Attachment Service supports, change the appropriate local variable
to true.
else if (obj instanceof SupportedAttachmentPart)
{
_hasSupportedAttachment = true;
}
10. If the BodyPart is an attachment that the BlackBerry Attachment Service does not support, change the appropriate local
variable to true.
13
Development Guide Retrieving the body of an email message
else if (mbp.getContentType().equals(ContentType.TYPE_MULTIPART_MIXED_STRING) ||
mbp.getContentType().equals(ContentType.TYPE_MULTIPART_ALTERNATIVE_STRING))
{
//The message has attachments or we are at the top level of the message.
//Extract all of the parts within the MimeBodyPart message.
findEmailBody(mbp.getContent());
}
14
Development Guide Retrieving the body of an email message
15
Development Guide Retrieving the body of an email message
16
Development Guide Retrieving the body of an email message
7. Check to see if the String representation of the content of the MimeBodyPart object contains
ContentType.TYPE_TEXT_PLAIN_STRING to determine if the MimeBodyPart object is the plain text body part
of the message.
if (mimeType.indexOf(ContentType.TYPE_TEXT_PLAIN_STRING) != -1)
{
8. Invoke MimeBodyPart.hasMore() and MimeBodyPart.moreRequestSent() to determine if all of the text body
part is present in the MimeBodyPart object.
if (mbp.hasMore() && !mbp.moreRequestSent())
{
9. If more data is available for the MimeBodyPart object, invoke Transport.more() to retrieve the rest of the data for
the MimeBodyPart object.
Transport.more((BodyPart)mbp, true);
10. Check to see if the String representation of the content of the MimeBodyPart object contains
ContentType.TYPE_TEXT_HTML_STRING to detemine if the MimeBodyPart object is the HTML body part of the
message.
else if (mimeType.indexOf(ContentType.TYPE_TEXT_HTML_STRING) != -1)
{
11. Invoke MimeBodyPart.hasMore() and MimeBodyPart.moreRequestSent() to determine if all of the HTML
body part is present in the MimeBodyPart object.
if (mbp.hasMore() && !mbp.moreRequestSent())
{
12. If more data is available for the MimeBodyPart object, invoke Transport.more() to retrieve the rest of the
MimeBodyPart object.
Transport.more((BodyPart)mbp, true);
17
Development Guide Notify a BlackBerry device application that an email message is about to be sent
if (mimeType.indexOf(ContentType.TYPE_TEXT_PLAIN_STRING) != -1)
{
_plainTextMessage = body;
18
Development Guide Notify a BlackBerry device application that an MMS message is about to be sent
import net.rim.blackberry.api.mail.NoSuchServiceException;
import net.rim.blackberry.api.mail.SendListener;
import net.rim.blackberry.api.mail.Session;
import net.rim.blackberry.api.mail.Store;
2. Implement the SendListener interface.
public class MailSendListener implements SendListener{...}
3. Create an instance of the class that implements the SendListener interface.
MailSendListener mailSL = new mailSendListener();
4. In a try block, invoke Session.waitForDefaultSession().getStore() to retrieve the Store object.
try
{
Store store = Session.waitForDefaultSession().getStore();
}
5. In a catch block, manage a NoSuchServiceException.
catch (NoSuchServiceException e)
{
System.out.println(e.toString());
}
6. Invoke Store.addSendListener(MailSendListener) to add a SendListener instance.
store.addSendListener(mailSL);
19
Development Guide Notify a BlackBerry device application that an SMS message is about to be sent
Send a message
1. Import the required classes and interfaces.
import net.rim.blackberry.api.mail.Address;
import net.rim.blackberry.api.mail.AddressException;
import net.rim.blackberry.api.mail.Folder;
import net.rim.blackberry.api.mail.Message;
import net.rim.blackberry.api.mail.MessagingException;
import net.rim.blackberry.api.mail.Session;
import net.rim.blackberry.api.mail.Store;
import net.rim.blackberry.api.mail.Transport;
2. Declare a Message object.
Message msg;
3. Specify a folder in which to save a copy of the sent message.
Store store = Session.getDefaultInstance().getStore();
Folder[] folders = store.list(Folder.SENT);
Folder sentfolder = folders[0];
msg = new Message(sentfolder);
4. Create an array of Address objects.
Address toList[] = new Address[1];
5. In a try block, add each address to the array.
20
Development Guide Send a message
try
{
toList[0]= new Address("[email protected]", "Ming Li");
}
6. In a catch block, manage a AddressException, which is thrown if an address is invalid.
catch(AddressException e)
{
System.out.println(e.toString());
}
7. Invoke Message.addRecipients() and provide the type of recipient (TO, CC, or BCC) and the array of addresses to
add as parameters to the method.
8. If the message has multiple types of recipients, invoke Message.addRecipients() once for each recipient type.
msg.addRecipients(Message.RecipientType.TO, toList);
9. Invoke Message.setFrom(Address).
Address from = new Address("[email protected]", "Ming Li");
msg.setFrom(from);
10. Invoke Message.setSubject(String).
msg.setSubject("Test Message");
11. Invoke Message.setContent(String). (Typically, the BlackBerry® device application retrieves content from text
that a BlackBerry device user types in a field.)
try
{
msg.setContent("This is a test message.");
}
catch(MessagingException e)
{
System.out.println(e.getMessage());
}
12. Invoke Session.getTransport() and store the returned object in a variable of type Transport. The
Transport object represents the messaging transport protocol.
Transport trans = Session.getTransport();
13. Invoke Transport.send(Message) to send the message.
try
{
trans.send(msg);
}
catch(MessagingException e)
21
Development Guide Reply to a message
{
System.out.println(e.getMessage());
}
Reply to a message
1. Import the required classes and interfaces.
import net.rim.blackberry.api.mail.Folder;
import net.rim.blackberry.api.mail.Message;
import net.rim.blackberry.api.mail.Session;
import net.rim.blackberry.api.mail.Store;
import net.rim.blackberry.api.mail.Transport;
2. Invoke Session.getTransport() and store the returned object in a variable of type Transport. The
Transport object represents the messaging transport protocol.
Transport trans = Session.getTransport();
3. Invoke Session.waitForDefaultSession().getStore() to retrieve the Store object.
Store store = Session.waitForDefaultSession().getStore();
4. Invoke Store.list(INBOX) to retrieve all the folders in the INBOX folder. Store the folders in a Folder array.
Folder[] folders = store.list(INBOX);
5. Specify a specific array element to retrieve the inbox folder.
Folder inbox = folders[0];
6. Invoke Folder.getMessages() to retrieve the messages in the inbox folder. Store the messages in a Message array.
Message[] messages = inbox.getMessages();
7. Invoke Message.reply(Boolean) and specify true to reply to all message recipients or false to reply to only the
sender.
if( messages.length > 0 )
{
Message msg = messages[0];
}
Message reply = msg.reply(true);
8. Invoke Transport.send(Message) to send the reply.
try
{
trans.send(reply);
}
catch(MessagingException e)
22
Development Guide Forward a message
{
System.out.println(e.getMessage());
}
Forward a message
1. Import the required classes and interfaces.
import net.rim.blackberry.api.mail.Address;
import net.rim.blackberry.api.mail.Message;
import net.rim.blackberry.api.mail.MessagingException;
import net.rim.blackberry.api.mail.Session;
import net.rim.blackberry.api.mail.Transport;
2. Invoke Message.forward() on an existing Message object. The subject line of a forwarded message is set automatically
to FW:original_subject.
Message fwdmsg = msg.forward();
3. Create an array of addresses.
Address toList[] = new Address[1];
4. Add a new Address object to the array.
toList[0]= new Address("[email protected]", "Ming Li");
5. Invoke Message.addRecipients(int, Address[]) to add recipients to the Message.
fwdmsg.addRecipients(Message.RecipientType.TO, toList);
6. Invoke Message,setContent(String) to set the content of the message that appears before the original message.
try
{
fwdmsg.setContent("This is a forwarded message.");
}
catch(MessagingException e)
{
System.out.println(e.getMessage());
}
7. Invoke Session.getTransport() and store the returned object in a variable of type Transport. The
Transport object represents the messaging transport protocol.
Transport trans = Session.getTransport();
8. Invoke Transport.send(Message).
try
{
trans.send(fwdmsg);
}
23
Development Guide Work with message folders
catch(MessagingException e)
{
System.out.println(e.getMessage());
}
Task Steps
Open a folder view a. Retrieve a list of folders.
Store store = null;
store =
Session.waitForDefaultSession().getStore();
Folder[] folders = store.list();
24
Development Guide Work with message folders
Task Steps
Retrieve a folder by its name a. Invoke Store.getFolder(String) and provide as a parameter the
absolute path to the folder.
Folder folder =
store.getFolder("Mailbox - Yan Wang/Inbox/
Projects");
25
Development Guide Attachments
Attachments 3
You can use the Mail API in the net.rim.blackberry.api.mail package to manage attachments in incoming email
messages and include attachments in outgoing email messages on a BlackBerry® device. An attachment is represented as a
separate BodyPart object on a Multipart message.
26
Development Guide Retrieve the contents of an attachment
27
Development Guide Download attachments automatically
• the application attempts to invoke the download while a download is already in progress
• the application attempts to download zero length files.
• the size of the attachment is larder than permitted by the application IT policy or service books
• attachments are encrypted
• there is not enough space available on the BlackBerry device or SD card
The AttachmentDownloadManager.download() method performs verification during the download process. If
verification errors are found, the method throws an exception. For a list of possible verification errors, see the API reference for
the BlackBerry® Java® Development Environment.
Note: The BlackBerry® Attachment Service receives all attachments first. Third-party attachment handlers cannot override this
default behavior. For more information about the BlackBerry Attachment Service, see the BlackBerry Enterprise Server
Administration Guide.
1. Import the required classes and interfaces.
28
Development Guide Download attachments automatically
import java.io.IOException;
import net.rim.blackberry.api.mail.*;
2. Implement the DownloadProgressListener interface. Create an instance of the
AttachmentDownloadManager class.
public class AutoAttachTest implements DownloadProgressListener
{
AttachmentDownloadManager _adm = new AttachmentDownloadManager();
3. Use the methods available in AttachmentDownloadManager to determine information about the attachment.
public String fileSize = getFileSize(BodyPart bodyPart);
public String fileName = getFileName(BodyPart bodyPart);
public String fileType = getFileContentType(BodyPart bodyPart);
public String filePath = getDownloadedFileName(BodyPart bodyPart);
4. Invoke AttachmentDownloadManager.download(), to download the attachment.
_adm.download(bodyParts, null, this);
5. Override the DownloadProgressListener callback methods, to provide updates about the status of the download of
the attachment.
private void downloadCancelled(String msg)
{
BodyPart bodyPart = (BodyPart) element;
_screen.displayProgress("Failed to download " + _adm.getFileName(bodyPart));
}
private void downloadCompleted(Object element)
{
BodyPart bodyPart = (BodyPart) element;
_screen.displayProgress(_adm.getFileName(bodyPart) + " downloaded.");
}
public void updateProgress(Object element, int current, int total)
{
}
29
Development Guide Calendar
Calendar 4
30
Development Guide Open a new populated calendar entry
31
Development Guide Update calendar entry information
Task Steps
Create an appointment Invoke createEvent() on an event list.
if (event.isSupportedField(Event.SUMMARY))
{
event.addString(Event.SUMMARY, Event.ATTR_NONE,
"Meet with customer");
}
if (event.isSupportedField(Event.LOCATION))
{
event.addString(Event.LOCATION, Event.ATTR_NONE,
"Conference Center");
}
if (event.isSupportedField(Event.START))
{
event.addDate(Event.START, Event.ATTR_NONE,
start);
}
if (event.isSupportedField(Event.END))
{
event.addDate(Event.END, Event.ATTR_NONE, start +
72000000);
}
if (event.isSupportedField(Event.ALARM))
32
Development Guide Update calendar entry information
Task Steps
{
if (event.countValues(Event.ALARM) > 0)
{
event.removeValue(Event.ALARM,0);
event.setInt(Event.ALARM, 0, Event.ATTR_NONE,
396000);
}
}
Create a recurring appointment a. Create a RepeatRule object. The RepeatRule class defines fields for
the properties and values that you can set, such as COUNT,
FREQUENCY, and INTERVAL.
b. Invoke RepeatRule.getFields() to retrieve an array of supported
fields.
c. Invoke RepeatRule.setInt(int, int) or
RepeatRule.setDate (int, int, int, long) on a new
RepeatRule object to define a recurring pattern.
EventList eventList =
(EventList)PIM.getInstance().openPIMList
(PIM.EVENT_LIST, PIM.READ_WRITE);
Event event = eventList.createEvent();
event.setRepeat(recurring);
Change appointment information a. Invoke the appropriate set method, such as setString() to replace
an existing value with a new one.
b. Invoke Event.countValues() to determine if a value is already set
for the field.
c. Use the corresponding set method, such as setString() to change
an existing value.
33
Development Guide Retrieve calendar entry information
Task Steps
if (event.countValues(Event.LOCATION) > 0)
{
event.setString(Event.LOCATION, 0,
Event.ATTR_NONE, "Board Room");
}
Save an appointment a. Before you save the appointment, to identify appointment fields that have
changed since the appointment was last saved, invoke
Event.isModified().
b. Invoke Event.commit().
if(event.isModified())
{
event.commit();
}
34
Development Guide Export a calendar entry
35
Development Guide Retrieve multiple lists of calendar entries
36
Development Guide Notify a BlackBerry device application when the default list of calendar entries changes
37
Development Guide Contact list
Contact list 5
You can use an instance of the ContactList class or BlackBerryContactList class in your application to add and view
contact information in the contacts application on the BlackBerry® device. You can create Contact or
BlackBerryContact objects to store information for individual contacts such as the name, phone number, email address,
and street address.
Your application can perform tasks such as adding, deleting, and changing contact list entries.
You can retrieve the names of the contact lists that are installed on a BlackBerry device by invoking PIM.listPIMLists
(int pimListType) and passing in PIM.CONTACT_LIST as pimListType. The String array that is returned provides
the system-assigned names for the contact lists on the device. The contact list name that is at index 0 of the returned
String array is the default contact list. You can retrieve the UID of a contact list on a BlackBerry device by invoking
BlackBerryPIMList.getPIMListUID().
You can open a contact list by its name by invoking PIM.openPIMList(int pimListType, int mode, String
name). You can open a contact list by its UID by invoking BlackBerryPIM.openPIMList(int pimListType, int
mode, long uid). You can open a list that combines multiple contact lists on a device by invoking one of the
BlackBerryPIM.openUnifiedPIMList() methods.
38
Development Guide Open the contacts application by using contact data
import net.rim.blackberry.api.invoke.Invoke;
import net.rim.blackberry.api.invoke.AddressBookArguments;
import net.rim.device.api.system.ControlledAccessException;
2. Invoke Invoke.invokeApplication(APP_TYPE_ADDRESSBOOK, AddressBookArguments).
AddressBookArguments abArg = new AddressBookArguments();
Invoke.invokeApplication(Invoke.APP_TYPE_ADDRESSBOOK, abArg);
3. Check for a ControlledAccessException if your application does not have permission to access the application that
it invokes.
39
Development Guide Open the contacts application with a specific contact list
40
Development Guide Create a contact and assign it to a contact list
{
...
}
7. Check for PIMException, and check for ControlledAccessException if your application does not have permission
to access the application that it invokes.
41
Development Guide Retrieve contact information
5. Invoke one or more of the following methods to add information for the new contact. For more information about
PIMItem methods, see the API reference for the BlackBerry® Java® Development Environment.
• addString()
• addStringArray()
• addDate()
• addInt()
• addBoolean()
• addBinary()
6. Invoke the following methods to verify that the information meets the size requirements and type requirements for the
specified contact field.
• Invoke ContactList.isSupportedField(int) to verify that the item supports the field type.
• Invoke ContactList.isSupportedAttribute(int, int) to verify that the field supports the specified
attribute.
• Invoke PIMList.maxValues(int field) to verify the number of values that the field supports.
7. Invoke Contact.commit() to commit the changes.
if(contact.isModified())
{
contact.commit();
}
8. Check for PIMException, and check for ControlledAccessException if your application does not have permission
to access the application that it invokes.
42
Development Guide Retrieve a contact list UID
43
Development Guide Export a contact
Export a contact
You can export contact information from a contact list on a BlackBerry® device to an output stream. The export process converts
a PIM item to a stream of bytes that another application can import. You can export PIM data to a supported serial format by
invoking PIM.toSerialFormat(PIMItem, OutputStream, String, String), and passing in as arguments the
PIMItem, the OutputStream to which the serialized PIMItem is written, the character encoding format to use when writing
to the output stream, and the supported serial format to convert to, such as vCard®.
44
Development Guide Import a contact
Import a contact
You can import contact information from a compatible input stream to a contact list on a BlackBerry® device. You can import
contact information by invoking fromSerialFormat(InputStream, String), and passing in as arguments the
InputStream from which the PIMItem is written and the character encoding format to use. Supported character encoding
formats include UTF8, ISO-8859-1, and UTF-16BE.
1. Import the required classes and interfaces.
import java.io.ByteArrayOutputStream;
import javax.microedition.pim.Contact;
import javax.microedition.pim.ContactList;
import javax.microedition.pim.PIM;
import javax.microedition.pim.PIMItem;
2. Invoke PIM.getInstance().fromSerialFormat() to return an array of PIM items.
ByteArrayInputStream istream =
new ByteArrayInputStream(outputStream.toByteArray());
PIMItem[] pi = PIM.getInstance().fromSerialFormat(istream, "UTF8");
3. Open a contact list and invoke ContactList.importContact() to create a new contact by using a PIM item.
ContactList contactList = (ContactList)
PIM.getInstance().openPIMList(PIM.CONTACT_LIST, PIM.READ_WRITE);
Contact contact2 = contactList.importContact((Contact) pi[0]);
contact2.commit();
Delete a contact
You can delete a contact from the default contact list or another contact list on a BlackBerry® device.
45
Development Guide Notify an application when a contact list changes
3. To delete a contact from a contact list that is not the default contact list, perform the following actions:
a. Invoke listPIMLists(int pimListType) to return an array of String objects. The returned array provides
the system-assigned name for each contact list. The default contact list is returned at index 0 of the array.
String[] lists = PIM.listPIMLists(PIM.CONTACT_LIST);
b. Iterate over the array that PIM.listPIMLists() returns to search for the system-assigned name for the contact
list that you want to delete.
c. Invoke PIM.openPIMList(int, int, String) to open the contact list instance, passing in as parameters the
type of list to open (PIM.CONTACT_LIST), the access mode with which to open the list (PIM.READ_WRITE,
PIM.READ_ONLY, or PIM.WRITE_ONLY), and the contact list name.
BlackBerryContactList contactList = (BlackBerryContactList)
PIM.getInstance().openPIMList(PIM.CONTACT_LIST, PIM.READ_WRITE, name);
46
Development Guide Notify an application when a contact list changes
a. Invoke listPIMLists(int), passing in as the parameter the type of list to open (PIM.CONTACT_LIST), to
return an array of String objects. The returned array provides the system-assigned name for each contact list. The
default contact list is returned at index 0 of the array.
String[] lists = PIM.listPIMLists(PIM.CONTACT_LIST);
b. Iterate over the array that PIM.listPIMLists() returns to search for the system-assigned name for the contact
list that you want to receive change notifications for.
c. Invoke PIM.openPIMList(int, int, String) to open the contact list instance, passing in as parameters the
type of list to open (PIM.CONTACT_LIST), the access mode with which to open the list (PIM.READ_WRITE,
PIM.READ_ONLY, or PIM.WRITE_ONLY), and the contact list name.
BlackBerryContactList contactList = (BlackBerryContactList)
PIM.getInstance().openPIMList(PIM.CONTACT_LIST, PIM.READ_WRITE, name);
47
Development Guide Linking third-party contacts with contacts in the contacts application
Link a contact
You can link a contact in your application with a contact in the contacts application on the BlackBerry® device. You can decide
how to interact with the BlackBerry device user when you link a contact. The steps that follow describe one possible approach.
Before you begin:
• Create the contacts in your application by creating and instantiating a class that implements the LinkableContact
interface.
• Define a class that implements AddressBookFieldFactory and register the class with your application. For more
information, see Create a custom field for linked contacts.
48
Development Guide Linking third-party contacts with contacts in the contacts application
BlackBerryContact bbContact =
LinkedContactUtilities.getContactLinkCandidate(linkableContact);
3. If a match is found, link your contact with the BlackBerryContact.
bbContact = LinkedContactUtilities.linkContact(bbContact, linkableContact);
4. If a match is not found, have the user select a contact in the contacts application to link to the selected contact.
BlackBerryContactList contacts = null;
try
{
contacts = (BlackBerryContactList) PIM.getInstance().
openPIMList(PIM.CONTACT_LIST, PIM.READ_WRITE);
}
catch(PIMException e)
{
ContactLinkingDemo.errorDialog("Couldn't open contacts list.");
return;
}
Remove a link
You can remove a link between a contact in your application and a contact in the contacts application on the BlackBerry® device.
49
Development Guide Linking third-party contacts with contacts in the contacts application
BlackBerryContact contact =
LinkedContactUtilities.getLinkedContact(linkableContact);
3. Remove the link between the contacts.
LinkedContactUtilities.unlinkContact(contact, linkableContact.getApplicationID());
If a contact in the contacts application is linked with contacts in multiple third-party applications, the menu items in the contacts
application are grouped with other applications of the same group.
• Social networking menu items are grouped under the Social Networking menu item.
• Instant messaging menu items are grouped under the Instant Messaging menu item.
• Menu items from other types of applications are grouped under the Contact Using menu item.
The menu items from the third-party applications with linked contacts are integrated with the menu for the contacts application.
50
Development Guide Linking third-party contacts with contacts in the contacts application
Situation Result
A group contains one application with linked The menu item for the application appears in the menu in the contacts
contacts. The application contains one menu application.
item.
A group contains one application with linked The application's name appears in the menu. Selecting the name displays a
contacts. The application contains multiple dialog box that contains a button for each menu item.
menu items.
A group contains multiple applications with The group menu item (such as Social Networking) appears in the menu.
linked contacts. Selecting the group menu item displays a dialog box with a button for each
application with linked contacts in the group.
51
Development Guide Linking third-party contacts with contacts in the contacts application
LinkedContactUtilities.registerMenuItems(items, APPLICATION_ID,
LinkedContactConstants.COMPOSE_SN_MENU_GROUP, appdesc);
52
Development Guide Linking third-party contacts with contacts in the contacts application
When a user selects a contact in the contacts application that is linked with a contact in your application, the field that you
defined in step 3 appears on the screen of the BlackBerry device.
53
Development Guide Task list
Task list 6
54
Development Guide Open a task list
import java.util.Enumeration;
import javax.microedition.pim.PIM;
import javax.microedition.pim.ToDo;
import javax.microedition.pim.ToDoList;
import net.rim.blackberry.api.invoke.Invoke;
import net.rim.blackberry.api.invoke.TaskArguments;
2. Create an instance of a ToDoList.
ToDoList tdl = (ToDoList)PIM.getInstance().openPIMList(PIM.TODO_LIST,
PIM.READ_WRITE);
3. Invoke createToDo() to create a new ToDo object and add information to the new ToDo object.
ToDo todo = tdl.createToDo();
todo.addString(ToDo.SUMMARY, 0, "Walk the Dog");
4. Invoke Invoke.invokeApplication() using the APP_TYPE_TASKS field, and a new TaskArguments object
created using the ARG_NEW field and the new ToDo object.
Invoke.invokeApplication(Invoke.APP_TYPE_TASKS,
new TaskArguments( TaskArguments.ARG_NEW, todo));
Create a task
1. Import the required classes and interfaces.
55
Development Guide Add task information
import javax.microedition.pim.ToDo;
import javax.microedition.pim.ToDoList;
2. Invoke ToDoList.createToDo()on a task list.
ToDo task = todoList.createToDo();
if (todoList.isSupportedField(ToDo.DUE))
{
Date date = new Date();
task.addDate(ToDo.DUE, ToDo.ATTR_NONE, (date + 17280000));
}
if (todoList.isSupportedField(ToDo.NOTE))
{
task.addString(ToDo.NOTE, ToDo.ATTR_NONE, "Required for meeting");
}
if (todoList.isSupportedField(ToDo.PRIORITY))
{
task.addInt(Todo.PRIORITY, ToDo.ATTR_NONE, 2);
}
56
Development Guide Change task information
Save a task
1. Import the required classes and interfaces.
import javax.microedition.pim.ToDo;
import javax.microedition.pim.ToDoList;
2. Before you commit your changes, invoke isModified() to determine whether any task fields have changed since the
task was last saved.
3. Invoke commit().
if(task.isModified())
{
task.commit();
}
57
Development Guide Export a task
ToDoList todoList =
(ToDoList)PIM.getInstance().openToDoList(PIM.TODO_LIST, PIM.READ_ONLY);
Enumeration enum = todoList.items();
3. Invoke ToDo.getFields() to retrieve an array of IDs for fields that have data for a particular ToDo item.
4. Invoke PIMItem.getString() to retrieve the field values.
while (enum.hasMoreElements())
{
ToDo task = (ToDo)enum.nextElement();
int[] fieldIds = task.getFields();
int id;
for(int index = 0; index < fieldIds.length; ++index)
{
id = fieldIds[index];
if(task.getPIMList().getFieldDataType(id) == STRING)
{
for(int j=0; j < task.countValues(id); ++j)
{
String value = task.getString(id, j);
System.out.println(task.getFieldLable(id) + "=" + value);
}
}
}
}
Export a task
1. Import the required classes and interfaces.
import java.io.ByteArrayOutputStream;
import java.util.Enumeration;
import javax.microedition.pim.PIM;
import javax.microedition.pim.ToDo;
import javax.microedition.pim.ToDoList;
2. Use an output stream writer to export tasks from the BlackBerry® device to a supported serial format.
3. To retrieve a string array of supported serial formats, invoke PIM.supportedSerialFormats(), and then specify the
list type (PIM.TODO_List).
4. To write an item to a serial format, invoke PIM.getInstance().toSerialFormat. The enc parameter specifies the
character encoding to use when writing to the output stream. Supported character encodings include "UTF8," "ISO-8859-1,"
and "UTF-16BE." This parameter cannot be null.
ToDoList todoList =
(ToDoList)PIM.getInstance().openPIMList(PIM.TODO_LIST, PIM.READ_ONLY);
ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
String[] dataFormats = PIM.getInstance().supportedSerialFormats(PIM.TODO_LIST);
Enumeration e = todoList.items();
58
Development Guide Import a task
while (e.hasMoreElements())
{
ToDo task = (ToDo)e.nextElement();
PIM.getInstance().toSerialFormat(task, byteStream, "UTF8", dataFormats[0]);
}
Import a task
1. Import the required classes and interfaces.
import java.io.ByteArrayInputStream;
import javax.microedition.pim.PIM;
import javax.microedition.pim.PIMItem;
import javax.microedition.pim.ToDo;
import javax.microedition.pim.ToDoList;
2. Invoke PIM.getInstance().fromSerialFormat() to return an array of PIMItem objects. The enc parameter
specifies the character encoding to use when writing to the output stream. Supported character encodings include "UTF8,"
"ISO-8859-1," and "UTF-16BE." This parameter cannot be null.
3. Invoke ToDoList.importToDo() to create a new task using the PIM items.
String[] dataFormats = PIM.toDoSerialFormats();
Delete a task
1. Import the required classes and interfaces.
import java.util.Enumeration;
import javax.microedition.pim.PIM;
import javax.microedition.pim.ToDo;
import javax.microedition.pim.ToDoList;
2. Invoke PIM.getInstance to create a ToDoList object.
ToDoList todoList = (ToDoList)PIM.getInstance().openToDoList(PIM.TODO_LIST,
PIM.READ_ONLY);
59
Development Guide Close the task list
60
Development Guide Phone
Phone 7
The net.rim.blackberry.api.phone package contains the APIs that you can use to access the phone application on
the BlackBerry® device. You can use this package to make calls, switch between available phone lines, receive notification events,
and change phone options.
61
Development Guide Add DTMF tones to the send queue
62
Development Guide Listen for and handle phone events
63
Development Guide Retrieve call information by using call logs
a. Override the MultiLineListener callback methods to notify the application when a line switching event occurs.
This is particularly important when using this feature on devices that operate on CDMA networks, as a delay might
occur when the application switches between phone lines.
public void setPreferredLineFailure(int lineId)
{
_screen.popupMessage("switching failed.");
}
public void setPreferredLineSuccess(int lineId)
{
_screen.popupMessage("Switching succeeded to " +
Phone.getLineNumber(lineId) + " completed." );
}
b. Invoke Phone.setPreferredLine(), passing in the line ID of the phone line to switch to. In the following code
sample, the application selects the line that returns at index 0.
Phone.setPreferredLine( Phone.getLineIds()[0]);
64
Development Guide Retrieve a call participant
65
Development Guide Retrieve a call by call ID
66
Development Guide Display content on a phone screen
67
Development Guide BlackBerry Browser
BlackBerry Browser 8
The following sample creates a menu item that displays a web page in the BlackBerry® Browser.
private MenuItem browserItem =
new MenuItem(_resources.getString(MENUITEM_BROWSER), 110, 12)
{
public void run()
{
BrowserSession visit = Browser.getDefaultSession();
visit.displayPage("http://www.blackberry.com");
}
};
68
Development Guide Enhanced support for web content in BlackBerry device applications
The APIs that are new in BlackBerry JDE 5.0 allow you to perform the following actions:
• load and configure the display settings for web content in Field objects in any application
• access the DOM for loaded web content
• control the HTTP handling for connections, SSL, cookies, and caching
• set callback listeners to monitor the loading progress of web pages
You can create applications that include Java objects and methods that can access and invoke JavaScript® code and be accessed
and invoked by JavaScript code by using the APIs in the net.rim.device.api.script package, which is new in BlackBerry
JDE 5.0.
public BrowserFieldDemo()
{
pushScreen(new BrowserFieldDemoScreen());
}
}
3. Create the custom screen by extending the MainScreen class.
class BrowserFieldDemoScreen extends MainScreen
{
public BrowserFieldDemoScreen()
{
}
}
4. In the screen constructor, create an instance of the BrowserField class.
69
Development Guide Enhanced support for web content in BlackBerry device applications
public BrowserFieldDemo()
{
pushScreen(new BrowserFieldDemoScreen());
}
}
3. Create the framework for the custom screen by extending the MainScreen class.
class BrowserFieldDemoScreen extends MainScreen
{
public BrowserFieldDemoScreen()
{
}
}
4. In the screen constructor, create an instance of the BrowserField class.
BrowserField myBrowserField = new BrowserField();
70
Development Guide Enhanced support for web content in BlackBerry device applications
5. In the screen constructor, invoke add() to add the BrowserField object to the screen.
add(myBrowserField);
6. In the screen constructor, invoke BrowserField.requestContent() to specify the location of the HTML content
and display it.
myBrowserField.requestContent("http://www.blackberry.com");
public BrowserFieldDemo()
{
pushScreen(new BrowserFieldDemoScreen());
}
}
3. Create the custom screen by extending the MainScreen class.
class BrowserFieldDemoScreen extends MainScreen
{
public BrowserFieldDemoScreen()
{
}
}
4. In the screen constructor, create an instance of the BrowserField class.
BrowserField myBrowserField = new BrowserField();
5. In the screen constructor, invoke add() to add the BrowserField object to the screen.
71
Development Guide Enhanced support for web content in BlackBerry device applications
add(myBrowserField);
6. In the screen constructor, invoke BrowserField.requestContent() to specify the location of the resource in your
application and display the HTML content.
myBrowserField.requestContent("local:///test.html");
Note: The BrowserField class does not access resources using a folder structure. The BrowserField class displays the
first resource found that matches the specifed file name.
public BrowserFieldDemo()
{
pushScreen(new BrowserFieldDemoScreen());
}
}
3. Create the framework for the custom screen by extending the MainScreen class.
class BrowserFieldDemoScreen extends MainScreen
{
public BrowserFieldDemoScreen()
{
}
}
4. In the screen constructor, create an instance of the BrowserFieldConfig class.
BrowserFieldConfig myBrowserFieldConfig = new BrowserFieldConfig();
72
Development Guide Enhanced support for web content in BlackBerry device applications
public BrowserFieldDemo()
{
pushScreen(new BrowserFieldDemoScreen());
}
}
3. Create the custom screen by extending the MainScreen class.
class BrowserFieldDemoScreen extends MainScreen
{
public BrowserFieldDemoScreen()
73
Development Guide Enhanced support for web content in BlackBerry device applications
{
}
}
4. In the screen constructor, create an instance of the BrowserField class.
BrowserField browserField = new BrowserField();
5. In the screen constructor, invoke add() to add the BrowserField object to the screen.
add(browserField);
6. In the screen constructor, create a String object that contains the base web address of the web page that you are sending
the form data to.
String baseURL = "http://www.blackberry.com";
7. In the screen constructor, create a String that specifies the form data that your application sends to the web page.
String postData = "fieldname1=value1&fieldname2=value2";
8. In the screen constructor, create a Hashtable object to store the header information for the form data.
Hashtable header = new Hashtable();
9. In the screen constructor, invoke Hashtable.put() to specify the header information for the form data.
header.put("Content-Length", "" + postData.length());
header.put("Content-Type", "application/x-www-form-urlencoded");
10. In the screen constructor, invoke BrowserField.requestContent() to send the form data to the web page and
display the web page.
browserField.requestContent(baseURL, postData.getBytes(), new
HttpHeaders(header));
74
Development Guide Menu items
Menu items 9
Task Steps
Define a menu item Extend the ApplicationMenuItem class.
public class SampleMenuItem extends
ApplicationMenuItem { ... }
Specify the position of the menu item Construct the ApplicationMenuItem. A higher number in the
in the menu constructor means that the menu item appears lower in the menu.
SampleMenuItem()
{
super(0x350100);
}
Specify the menu item text Implement toString().
public String toString()
{
return "My menu item";
}
Specify the behavior of the menu item Implement run().
75
Development Guide Create and register a menu item
Task Steps
public Object run(Object context)
{
// the menu's action here
return null;
}
Register the menu item Invoke ApplicationMenuItemRepository.addMenuItem().
ApplicationMenuItemRepository amir =
ApplicationMenuItemRepository.getInstance();
amir.addMenuItem(
ApplicationMenuItemRepository.MENUITEM_PHONE,
mySampleMenuItem);
For more information, see the Application Integration category overview in the API reference for the BlackBerry® Java®
Development Environment.
76
Development Guide Glossary
Glossary 10
API
application programming interface
BCC
blind carbon copy
CC
carbon copy
CRM
customer relationship management
DTMF
Dual Tone Multiple-frequency
JSR
Java® Specification Request
MIME
Multipurpose Internet Mail Extensions
MEID
Mobile Equipment Identifier
MMS
Multimedia Messaging Service
PIM
personal information management
PIN
personal identification number
SMS
Short Message Service
SVG
Scalable Vector Graphics
UCS
Universal Content Stream
77
Development Guide Glossary
UID
unique identifier
UTF
UCS Transformation Format
78
Development Guide Provide feedback
Provide feedback 11
To provide feedback on this deliverable, visit www.blackberry.com/docsfeedback.
79
Development Guide Document revision history
Date Description
6 April 2010 Changed the following topics:
80
Development Guide Document revision history
Date Description
• Configure a browser field
• Display HTML content in a browser field
• Display HTML content from a web page in a browser field
• Display HTML content from a resource in your application
• Enhanced support for web content in BlackBerry device applications
• Send form data to a web address in a browser field
81
Development Guide Legal notice
Legal notice 13
©2010 Research In Motion Limited. All rights reserved. BlackBerry®, RIM®, Research In Motion®, SureType®, SurePress™ 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. Java and JavaScript are trademarks of Sun Microsystems, Inc. iCal is a trademark of
Apple Inc. Microsoft, ActiveX, Internet Explorer, and Windows are trademarks of Microsoft Corporation. Mozilla is a trademark
of Mozilla foundation. Plazmic is a trademark of Plazmic Inc. vCard is a trademark of the Internet Mail Consortium. Wi-Fi and
802.11a, 802.11b, 802.11g are trademarks 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.
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 NON-
PERFORMANCE 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,
82
Development Guide Legal notice
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.
Certain features outlined in this documentation require a minimum version of BlackBerry® Enterprise Server, BlackBerry® Desktop
Software, and/or BlackBerry® Device Software.
83
Development Guide Legal notice
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.
Published in Canada
84