Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
New Contributor
Posts: 2
Registered: ‎07-20-2010
My Device: Not Specified

How to open internal MMS edit screen with "To" field filled?

My widget need navigate user to MMS edit screen when he/she choose menu item looking like "MMS +10086" from system context menu.

 

Widget AP only support SMS, so I am trying to realize this function by Jscript API.

 

But I found Jsrcript API only support opening an empty MMS edit screen, that is to say, not provide input paramter like "To".

 

My code is written as below:

Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES, new MessageArguments(MessageArguments.ARG_NEW_MMS));

 

How can I transfer value of "To" when openning a MMS edit screen?

Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: How to open internal MMS edit screen with "To" field filled?

The message arguments constructor should allow you to set the "To"

 

MessageArguments(String arg, String to, String subject, String body)

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
New Contributor
Posts: 2
Registered: ‎07-20-2010
My Device: Not Specified

Re: How to open internal MMS edit screen with "To" field filled?

Thanks!

 

But  in API, this method is not allow for SMS and MMS.

 

I paste description of this method from API:

 

********************************************** 

MessageArguments
public MessageArguments(String arg,
                        String to,
                        String subject,
                        String body)Creates a new MessageArguments instance with provided arguments
Parameters:
arg - Use ARG_NEW to create a new, simple email message. Use ARG_NEW_PIN to create a new, simple PIN message. Quick MMS and SMS are not supported. Use MessageArguments(String) to create blank MMS and SMS messages, or MessageArguments(javax.wireless.messaging.TextMessage) to create a populated SMS 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/PIN
body - The email/PIN body
Since:
JDE 4.1.0 

************************************************

 

Anyway, I tried this method on MMS as below:

 

Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES, new MessageArguments(MessageArguments.ARG_NEW_MMS,"10086","a","b"));

 

and got exception "java.lang.IllegalArgumentExeception: Invalid argument specified." as expected