14
BlackBerry Device Applications Integration Guide
Create a new populated email message. 1.
Create and populate a new email
message
object.
net.rim.blackberry.api.mail.Message m = new
net.rim.blackberry.api.mail.Message();
Address a = new Address("[email protected]", "Ming Li");
Address[] addresses = {a};
m.addRecipients(net.rim.blackberry.api.mail.Message.RecipientType.TO
, addresses);
m.setContent("A message for you...");
m.setSubject("Email for you");
2. Invoke i
nvokeApplication()
with the following parameters:
•
APP_TYPE_MESSAGES: a constant parameter
•
MessageArguments
: a new
MessageArguments
object that uses the new email
Message
object.
Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES, new
MessageArguments(m));
Create a new blank PIN message.
>
Invoke
invokeApplication()
using the APP_TYPE_MESSAGES constant parameter and a
new
MessageArguments
object that uses the ARG_NEW_PIN parameter.
Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES, new MessageArguments(
MessageArguments.ARG_NEW_PIN));
Create a new populated PIN message.
1.
Create and populate a new PIN message.
net.rim.blackberry.api.mail.Message m = new
net.rim.blackberry.api.mail.Message();
PINAddress pa = new PINAddress("ABCDEF99", "Mark Chapters");
Address[] addresses = {pa};
m.addRecipients(
net.rim.blackberry.api.mail.Message.RecipientType.TO, addresses );
m.setContent("A message for you...");
m.setSubject("PIN message for you");
2. Invoke
invokeApplication()
with the following parameters:
•
APP_TYPE_MESSAGES: a constant parameter
•
MessageArguments:
a new
MessageArguments
object that uses the new
PIN
message.
Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES, new
MessageArguments(m));
Task
Steps
Summary of Contents for JAVA DEVELOPMENT ENVIRONMENT - - DEVICE APPLICATIONS INTEGRATION - DEVELOPMENT GUIDE
Page 4: ......
Page 7: ......
Page 10: ...10 BlackBerry Device Applications Integration Guide...
Page 12: ...12 BlackBerry Device Applications Integration Guide...
Page 50: ...50 BlackBerry Device Applications Integration Guide...
Page 56: ...56 BlackBerry Device Applications Integration Guide...
Page 65: ......
Page 66: ...2008 Research In Motion Limited Published in Canada...