Blackberry JAVA DEVELOPMENT ENVIRONMENT - - DEVICE APPLICATIONS INTEGRATION - DEVELOPMENT GUIDE Integration Manual page 24

Blackberry device applications integration guide
Table of Contents

Advertisement

BlackBerry Device Applications Integration Guide
2. Complete any of the following actions:
Task
Open a folder view.
List the folders in a mailbox
store.
Retrieve an array of folders by
type.
Retrieve an array of folders
through a search.
Retrieve a folder by its name. 1. Invoke g
Retrieve a folder by its ID.
File a message.
24
Steps
store.list()
1. Invoke
to retrieve a list of folders.
Store store = null;
store = Session.waitForDefaultSession().getStore();
Folder[] folders = store.list();
nvokeApplication()
2. Invoke i
MessageArguments
object that uses a folder from the list of folders as a parameter.
Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES, new MessageArguments(
folders[0]));
Store.list().
>
Invoke
Folder[] folders = store.list();
ist(int)
>
Invoke l
and provide as a parameter the folder type.
Folder[] folders = store.list(INBOX);
Folder inbox = folders[0];
findFolder(String)
>
Invoke
Folder[] folders = store.findFolder("Inbox");
etFolder(String)
Folder folder = store.getFolder("Mailbox - Aisha Wahl/Inbox/Projects");
a FolderNotFoundException
2. Create code to manage
getID()
1. Invoke
to retrieve the folder ID.
getFolder()
2. Invoke
with the ID as a parameter.
Folder[] folders = store.list();
long id = folders[0].getId();
Folder f2 = store.getFolder(id);
appendMessage(Message)
>
Invoke
Message msg = new Message();
//...
Folder folder = store.getFolder("Inbox");
folder.appendMessage(msg);
using the APP_TYPE_MESSAGES constant parameter and a new
.
and provide as a parameter the absolute path to the folder.
exception if the folder does not exist.
Folder
on a
object.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Java development environment 4.6.0

Table of Contents