|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rim.blackberry.api.invoke.ApplicationArguments
net.rim.blackberry.api.invoke.MessageArguments
public final class MessageArguments
Encapsulates arguments to pass to the Messages application.
Field Summary | ||
---|---|---|
|
static String |
ARG_DEFAULT
Argument to open the Messages application using the default (main message list) view. |
|
static String |
ARG_NEW
Argument to open the Messages application to compose a new email message. |
|
static String |
ARG_NEW_MMS
Argument to open the Messages application to compose a new MMS message. |
|
static String |
ARG_NEW_PIN
Argument to open the Messages application to compose a new PIN message. |
|
static String |
ARG_NEW_SMS
Argument to open the Messages application to compose a new SMS message. |
|
static String |
ARG_SAVED
Argument to open the Messages application in the saved message list. |
|
static String |
ARG_SEARCH
Argument to open the Messages application in the message search screen. |
Constructor Summary | ||
---|---|---|
|
MessageArguments()
Creates a new MessageArguments instance with default arguments. |
|
|
MessageArguments(String arg)
Creates a new MessageArguments instance with provided arguments. |
|
|
MessageArguments(String arg,
String to,
String subject,
String body)
Creates a new MessageArguments instance with provided arguments. |
|
|
MessageArguments(MultipartMessage multipartMessage)
Creates a new MessageArguments instance that takes a MultipartMessage as an argument. |
|
|
MessageArguments(TextMessage textMessage)
Creates a new MessageArguments instance that takes a TextMessage as an
argument. |
|
|
MessageArguments(Folder folder)
Creates a new MessageArguments instance that takes a mailbox Folder as an argument. |
|
|
MessageArguments(Message message)
Creates a new MessageArguments instance that takes a Message as an argument
If the message parameter references an existing email message, it will be displayed in view mode. |
|
|
MessageArguments(ApplicationMessageFolder folder)
Creates a new MessageArguments instance that takes an ApplicationMessageFolder as an argument. |
Method Summary |
---|
Methods inherited from class net.rim.blackberry.api.invoke.ApplicationArguments |
---|
getArgs |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String ARG_DEFAULT
public static final String ARG_SAVED
public static final String ARG_SEARCH
public static final String ARG_NEW
public static final String ARG_NEW_PIN
public static final String ARG_NEW_SMS
public static final String ARG_NEW_MMS
Constructor Detail |
---|
public MessageArguments()
MessageArguments
instance with default arguments.
The Messages application will open in
the default (main list) view.
public MessageArguments(String arg)
MessageArguments
instance with provided arguments.
arg
- Use MessageArguments.ARG_DEFAULT
to open the default message list.MessageArguments.ARG_SAVED
to open the saved message list.MessageArguments.ARG_SEARCH
to open the search message screen.MessageArguments.ARG_NEW
to open the email message compose screen.MessageArguments.ARG_NEW_PIN
to open the PIN message compose screen.MessageArguments.ARG_NEW_SMS
to open the SMS message compose screen.MessageArguments.ARG_NEW_MMS
to open the MMS message compose screen.public MessageArguments(String arg, String to, String subject, String body)
MessageArguments
instance with provided arguments.
Use this constructor to create a new, simple email message or PIN message.
Use MessageArguments.MessageArguments(String)
to create a blank MMS or SMS message, or MessageArguments(TextMessage)
to create a populated SMS message.
arg
- Use MessageArguments.ARG_NEW
to create a new, simple email message.
Use MessageArguments.ARG_NEW_PIN
to create a new, simple PIN message.to
- The email address for the recipient if ARG_NEW
was specified.
The PIN address for the recipient if ARG_NEW_PIN
was specified.subject
- A subject for the email or PIN message.body
- The email or PIN message body.public MessageArguments(Message message)
MessageArguments
instance that takes a Message
as an argument
If the message parameter references an existing email message, it will be displayed in view mode. If the message references a new email message or new PIN message, it will be opened in a compose screen ready to send.
message
- A Message
object (PIN or email).public MessageArguments(TextMessage textMessage)
MessageArguments
instance that takes a TextMessage
as an
argument.
If the recipient address of the specified TextMessage
has a destination port specified,
the message composed by the Messages application will be sent to that port.
If the recipients are modified by the user, such as changing the recipient or adding a new
one, then all recipients will receive the message at the specified port. If the port
number is not valid, it is discarded and the entire string is considered to be the
recipient's phone number. The port number is also considered invalid if it is a
"reserved port" as defined in JSR 205:
Wireless Messaging API 2.0, which extends and enhances JSR 120: Wireless Messaging API. Other
validity checks may be performed on the port number, and if found to be invalid then the port
number will be considered part of the recipient's phone number, exactly as it is when invalid
for other reasons.
For example, if the recipient is "sms://5195551212:1234" then the destination port will be 1234. If the recipient is "sms://5195551212:a1234" then the destination port will be the default port and the recipient's phone number will be considered to be "5195551212:a1234". If the recipient is "sms://5195551212:2805" then the destination port will be the default port and the recipient's phone number will be considered to be "5195551212:2805" because port 2805 is a "reserved" port, as specified in section "A.6.0 Restrictions on Port Numbers for SMS Messages" in Wireless Messaging API (WMA) for Java 2 Micro Edition Version 1.0.2 Final Release (JSR205).
textMessage
- A TextMessage
object (SMS). With the resulting
MessageArguments
object, the Messages application will be launched with the data in the
TextMessage
pre-populated in an SMS compose screen, ready to send.public MessageArguments(MultipartMessage multipartMessage)
MessageArguments
instance that takes a MultipartMessage
as an argument.
multipartMessage
- A MultipartMessage
object (MMS). With the resulting
MessageArguments
object, the Messages application will be launched with the data in the
MultipartMessage
pre-populated in an MMS compose screen, ready to send.public MessageArguments(Folder folder)
MessageArguments
instance that takes a mailbox Folder
as an argument. With the resulting
MessageArguments
object, the Messages application will be launched to view the specified folder.
folder
- The mailbox folder to view in the Messages application.public MessageArguments(ApplicationMessageFolder folder)
MessageArguments
instance that takes an ApplicationMessageFolder
as an argument. With the resulting
MessageArguments
object, the Messages application will be launched to view the specified application message folder.
folder
- The application message folder to view in the Messages application.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal