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

Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.

New Developer
Posts: 18
Registered: ‎11-14-2008
My Device: Not Specified
Accepted Solution

add menu item to the Phone Application


I would like to add a menu item to the Phone application. i m using JDE 4.3 .

please help.


Posts: 17,025
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: add menu item to the Phone Application

extend ApplicationMenuItem and add it using ApplicationMenuItemRepository.
For example:
new PhoneMenuItem(0));
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
New Developer
Posts: 54
Registered: ‎11-12-2008
My Device: Bold 9800 or Storm 3 whichever hits Verizon first.
My Carrier: Verizon

Re: add menu item to the Phone Application



I had the same issue. makeMenu() method is called EACH AND EVERY TIME that the menu key is pressed.

Thank you all for your support
Posts: 5,339
Registered: ‎09-20-2008
My Device: ***
My Carrier: ***

Re: add menu item to the Phone Application

Posts: 45
Registered: ‎01-16-2009
My Device: Not Specified

Re: add menu item to the Phone Application



i am new in blackberry development. I have read the thread and the passage in the devoloper guide according creating custom menu entry. I have set a demo-application but nothing happens. Can anyone give me a hint what i have done wrong?


In my app there are to classes (Asteris.java and AsterisMenuItem.java)




import net.rim.blackberry.api.menuitem.ApplicationMenuItemRepository;
import net.rim.device.api.system.Application;

public class Asteris extends Application
    public static void main(String[] args)
            // Create a new instance of the application
            // and start it's event thread.
            new Asteris().enterEventDispatcher();
    public Asteris()
        AsterisMenuItem asterisMenuItem = new AsterisMenuItem(20);






import net.rim.blackberry.api.mail.Message;
import net.rim.blackberry.api.menuitem.ApplicationMenuItem;

public class AsterisMenuItem  extends ApplicationMenuItem
        //using the default constructors here.
        AsterisMenuItem(int order){

        //methods we must implement
        //Run is called when the menuItem is invoked
        public Object run(Object context){
            //context object should be a email message
            if (context instanceof Message){
                Message message = (Message)context;
                //this is where we would work the message
              //do something here
            return context;

        //toString should return the string we want to
        //use as the lable of the menuItem
        public String toString(){
            return "Asteris Menu";


Sorry for bad english, please help.






Posts: 3,951
Registered: ‎07-15-2008
My Device: Not Specified

Re: add menu item to the Phone Application

Hi ribun,

Please start a new Post.  It will be easy for tracking and others will find soultion for simillar problems.


Any way, i took the same java files of yours and compiled and it gave the desired results. You can see "Asteris Menu" when you select "Compose E-mail" and Press Menu button.


One change i did is like made the application Auto run on start up.



Use Search. "Accept Solution" If the problem is resolved.
Posts: 45
Registered: ‎01-16-2009
My Device: Not Specified

Re: add menu item to the Phone Application

Thank you verry much, the "autoru-hint" was the crucial one.


Next time i post a question i will create an new thread, but in most foren it is not gladly seen if user create new threads for existing "problems".