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

Java Development

Reply
Developer
Posts: 300
Registered: ‎03-12-2009
My Device: Not Specified

Prepopulate SMS Message with TEXT

Is it possible to prepopulate a SMS message ?

I'm invoking it as follows:

 

 

    public void sms()
    {
        MessageArguments messageArgs = new MessageArguments(MessageArguments.ARG_NEW_SMS);
        Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES, messageArgs);  
    }

 

 

 

If I add arguements like PIN and EMail, I get an arguement exception...

 

 

    public void email()
    {
        MessageArguments messageArgs = new MessageArguments(MessageArguments.ARG_NEW,"","","body");
        Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES, messageArgs);
    }

 

Thanks

 

Harry

 

 

Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Prepopulate SMS Message with TEXT

The invoke call that you are using requires that the "To:" address and subject also are set.

 

You might also look at creating a new Message object. Make sure you use the net.rim.blackberry.api.mail.Message package and not the javax.wireless package.

 

 

 

 

 

 

Highlighted
Developer
Posts: 300
Registered: ‎03-12-2009
My Device: Not Specified

Re: Prepopulate SMS Message with TEXT

I tried adding both of them to the SMS and it throws the error..