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: 402
Registered: ‎11-26-2010
My Device: Torch

How to open the sms application with predefined content

I have tried the approaches suggested here but on bold 9000 os 5.0 it just opens the sms app and the sms content is not predefined.

Here is the code:

MessageConnection mc = (MessageConnection) Connector.open("sms://");
TextMessage m = (TextMessage) mc.newMessage(MessageConnection.TEXT_MESSAGE);
m.setPayloadText(body); //i checked body is nor empty,neither too long string
m.setAddress("sms://");
Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES, new MessageArguments(m));

 

 

 

----------------------------------------------------------------------
Press the button to give kudos if I helped you Smiley Happy
Developer
Posts: 16,851
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: How to open the sms application with predefined content

search the forum, i remember reading some posts about that.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 402
Registered: ‎11-26-2010
My Device: Torch

Re: How to open the sms application with predefined content

I found this http://supportforums.blackberry.com/t5/Java-Development/OS-5-0-Bug-invokeApplication-with-TextMessag... but it doesn't seem to offer a solution. Maybe there isn't one
----------------------------------------------------------------------
Press the button to give kudos if I helped you Smiley Happy