Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 408471
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T17:41:42+00:00 2026-05-12T17:41:42+00:00

I’d like to describe one trick I learned at supportforums.blackberry.com There is a native

  • 0

I’d like to describe one trick I learned at supportforums.blackberry.com

There is a native dialer Phone Application in BlackBerry.

The trick is to programmatically run menu items of dialer after incoming call, call fail or any other call event.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T17:41:43+00:00Added an answer on May 12, 2026 at 5:41 pm

    There is a PhoneListener interface, which gives an ability to listen to the status of incoming and outgoing phone calls.

    See Listen for and handle phone events

    A quote from supportforums.blackberry.com – Re: How to exit an Ui application (by simon_hain):

    Listeners are hard referenced by the application they are added to. Figuratively speaking, they become part of the rim application.

    If you add a listener to the phone application this listener is executed in the context of the phone app.
    You can check this by using Ui.getUiEngine().getActiveScreen() in a listener method. The returned screen is the call screen of the phone application.

    I use this to execute commands on phone calls:
    – on callInitiated or callConnected i store a reference to the phone screen.
    – i call phoneScreen.getMenu(0)

    now i want to execute a command:
    – i change the locale to “en”
    – i iterate through the menu using menu.getSize() and menu.getItem(i)
    – i check if menuItem.toString equals my command
    – i call menuItem.run()
    – and change the locale back (if it was changed)

    you can use this to:
    mute
    unmute
    activate speakerphone
    view speeddiallist
    end the call (only prior to 4.5/4.6, not sure which one)
    and many more. just print the available menu items 🙂

    A sample code for this trick, on incoming call print all menu to console, on answer call mute phone on end call – unmute phone:

    public class UseScreenMenu extends Application implements PhoneListener {
        String MENU_ITEM_MUTE = "Mute";
        String MENU_ITEM_UNMUTE = "Unmute";
        public UseScreenMenu() {
            Phone.addPhoneListener(this);
        }
    
        public static void main(String[] args) {
            UseScreenMenu app = new UseScreenMenu();
            app.enterEventDispatcher();
        }
    
        public void callIncoming(int callId) {
            printMenu();    
        }
    
        public void callAnswered(int callId) {
            runMenuItem(MENU_ITEM_MUTE);
        }
    
        public void callEndedByUser(int callId) {
            runMenuItem(MENU_ITEM_UNMUTE);  
        }
    
        private void printMenu() {      
            Screen screen = Ui.getUiEngine().getActiveScreen();
            Menu menu = screen.getMenu(0);
            System.out.println("Menu of BB Dialler - Begin");
            for (int i = 0, cnt = menu.getSize(); i < cnt; i++)
                System.out.println("Menu of BB Dialler - "
                    +menu.getItem(i).toString());
            System.out.println("Menu of BB Dialler - End");     
        }
    
        private void runMenuItem(String menuItemText) {
            Screen screen = Ui.getUiEngine().getActiveScreen();
            Menu menu = screen.getMenu(0);
            for (int i = 0, cnt = menu.getSize(); i < cnt; i++)
                if(menu.getItem(i).toString().equalsIgnoreCase(menuItemText))
                    menu.getItem(i).run();
        }
    
    
        public void callAdded(int callId) {}
        public void callConferenceCallEstablished(int callId) {}
        public void callConnected(int callId) {}
        public void callDirectConnectConnected(int callId) {}
        public void callDirectConnectDisconnected(int callId) {}
        public void callDisconnected(int callId) {}
        public void callFailed(int callId, int reason) {}
        public void callHeld(int callId) {}
        public void callInitiated(int callid) {}
        public void callRemoved(int callId) {}
        public void callResumed(int callId) {}
        public void callWaiting(int callid) {}
        public void conferenceCallDisconnected(int callId) {}
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.