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: 109
Registered: ‎02-09-2009
My Device: Not Specified
Accepted Solution

Insert text into message

I am trying to write an app that you can add text to a message you are editing, but I cannot seem to figure it out.

 

I can add a MenuItem to all the message editing screens, but how can I have the user select a message and someone pass that back, and then what do I do?

 

I believe I have to update the message context that gets passed into the Run() method of my ApplicationMenuItem.

Developer
Posts: 342
Registered: ‎02-04-2009
My Device: BB 8320

Re: Insert text into message

A relevant discussion thread for your reference, http://supportforums.blackberry.com/rim/board/message?board.id=java_dev&message.id=23942#M23942 


Use Search. "Accept Solution" if the problem gets resolved.
Developer
Posts: 109
Registered: ‎02-09-2009
My Device: Not Specified

Re: Insert text into message

Ouch, I was hoping it wouldnt come down to Event Injection...
Developer
Posts: 342
Registered: ‎02-04-2009
My Device: BB 8320

Re: Insert text into message

If you need to insert text into your messages without using Event Injection, you can go for your own custom messaging application.


Use Search. "Accept Solution" if the problem gets resolved.
Developer
Posts: 109
Registered: ‎02-09-2009
My Device: Not Specified

Re: Insert text into message

I was hoping to just be able to use setPayload(String text) to add the text in, those other solutions are much more involved.
Developer
Posts: 342
Registered: ‎02-04-2009
My Device: BB 8320

Re: Insert text into message

Do you just looking to append some text while sending the message?

 

Then also I think as we don't have any reference to the messaging application, its not possible. 


Use Search. "Accept Solution" if the problem gets resolved.
Highlighted
BlackBerry Development Advisor
Posts: 15,699
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Insert text into message

You can modify the Message passed into the run method of an ApplicationMenuItem.  Once finished, call the updateUi method to update the Messages application (display the modified message).
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker