net.rim.blackberry.api.invoke
Class MessageArguments

java.lang.Object
  extended by net.rim.blackberry.api.invoke.ApplicationArguments
      extended by net.rim.blackberry.api.invoke.MessageArguments

public final class MessageArguments
extends ApplicationArguments

Encapsulates arguments to pass to the Messages application.

Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

Field Summary
Category: Signed static String ARG_DEFAULT
          Argument to open the Messages application using the default (main message list) view.
Category: Signed static String ARG_NEW
          Argument to open the Messages application to compose a new email message.
Category: Signed static String ARG_NEW_MMS
          Argument to open the Messages application to compose a new MMS message.
Category: Signed static String ARG_NEW_PIN
          Argument to open the Messages application to compose a new PIN message.
Category: Signed static String ARG_NEW_SMS
          Argument to open the Messages application to compose a new SMS message.
Category: Signed static String ARG_SAVED
          Argument to open the Messages application in the saved message list.
Category: Signed static String ARG_SEARCH
          Argument to open the Messages application in the message search screen.
 
Constructor Summary
Category: Signed MessageArguments()
          Creates a new MessageArguments instance with default arguments.
Category: Signed MessageArguments(String arg)
          Creates a new MessageArguments instance with provided arguments.
Category: Signed MessageArguments(String arg, String to, String subject, String body)
          Creates a new MessageArguments instance with provided arguments.
Category: Signed MessageArguments(MultipartMessage multipartMessage)
          Creates a new MessageArguments instance that takes a MultipartMessage as an argument.
Category: Signed MessageArguments(TextMessage textMessage)
          Creates a new MessageArguments instance that takes a TextMessage as an argument.
Category: Signed MessageArguments(Folder folder)
          Creates a new MessageArguments instance that takes a mailbox Folder as an argument.
Category: Signed 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.
Category: Signed 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

ARG_DEFAULT

public static final String ARG_DEFAULT
Argument to open the Messages application using the default (main message list) view.

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

ARG_SAVED

public static final String ARG_SAVED
Argument to open the Messages application in the saved message list.

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

ARG_SEARCH

public static final String ARG_SEARCH
Argument to open the Messages application in the message search screen.

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

ARG_NEW

public static final String ARG_NEW
Argument to open the Messages application to compose a new email message.

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.1.0

ARG_NEW_PIN

public static final String ARG_NEW_PIN
Argument to open the Messages application to compose a new PIN message.

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.2.0

ARG_NEW_SMS

public static final String ARG_NEW_SMS
Argument to open the Messages application to compose a new SMS message.

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.2.0

ARG_NEW_MMS

public static final String ARG_NEW_MMS
Argument to open the Messages application to compose a new MMS message.

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.2.0


Constructor Detail

MessageArguments

public MessageArguments()
Creates a new MessageArguments instance with default arguments. The Messages application will open in the default (main list) view.

Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

MessageArguments

public MessageArguments(String arg)
Creates a new MessageArguments instance with provided arguments.

Parameters:
arg - Use MessageArguments.ARG_DEFAULT to open the default message list.
Use MessageArguments.ARG_SAVED to open the saved message list.
Use MessageArguments.ARG_SEARCH to open the search message screen.
Use MessageArguments.ARG_NEW to open the email message compose screen.
Use MessageArguments.ARG_NEW_PIN to open the PIN message compose screen.
Use MessageArguments.ARG_NEW_SMS to open the SMS message compose screen.
Use MessageArguments.ARG_NEW_MMS to open the MMS message compose screen.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

MessageArguments

public MessageArguments(String arg,
                        String to,
                        String subject,
                        String body)
Creates a new 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.

Parameters:
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.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.1.0

MessageArguments

public 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. If the message references a new email message or new PIN message, it will be opened in a compose screen ready to send.

Parameters:
message - A Message object (PIN or email).
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.2.0

MessageArguments

public MessageArguments(TextMessage textMessage)
Creates a new 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).

Parameters:
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.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.2.0

MessageArguments

public MessageArguments(MultipartMessage multipartMessage)
Creates a new MessageArguments instance that takes a MultipartMessage as an argument.

Parameters:
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.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 5.0.0

MessageArguments

public MessageArguments(Folder folder)
Creates a new 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.

Parameters:
folder - The mailbox folder to view in the Messages application.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.2.0

MessageArguments

public MessageArguments(ApplicationMessageFolder folder)
Creates a new 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.

Parameters:
folder - The application message folder to view in the Messages application.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 6.0.0





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