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
Highlighted
New Developer
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

Developer
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.

New Developer
Posts: 20
Registered: ‎01-05-2009
My Device: Not Specified

Re: Retrieve Selected Message from Messages Application

Thanks RexDoug, that makes sense!