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
New Developer
GregSmith104
Posts: 20
Registered: ‎01-05-2009
My Device: Not Specified
Accepted Solution

Retrieve Selected Message from Messages Application

When I click on my custom menu item in the "Messages" application I want to be able to retrieve the currently selected message. How do I do this?

 

If I have a message open and I click my custom menu item how would I reference the currently opened message?

 

 

 

Thanks

Greg

Please use plain text.
Developer
RexDoug
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Retrieve Selected Message from Messages Application

The message is passed back to your menu.run() method in the "context object".

 

You would cast this Object back to Message and do whatever you want with it.

 

See the API docs for ApplicationMenuItem and ApplicationMenuItemRepository.

Please use plain text.
New Developer
GregSmith104
Posts: 20
Registered: ‎01-05-2009
My Device: Not Specified

Re: Retrieve Selected Message from Messages Application

Thanks RexDoug, that makes sense!
Please use plain text.