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

  • SEARCH
  • Home
  • 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 7967231
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T06:38:23+00:00 2026-06-04T06:38:23+00:00

hey i want to press 1 or 2 during the call. as example when

  • 0

hey i want to press 1 or 2 during the call. as example when you call a call center and want press 1 key to go to sales department without click this number by your hand, but i want to click it problematically during the Call.

Now i can invoke keypress and handle the call events but it doesn’t work.

PhoneStateListener myCallListener = new PhoneStateListener(){
            @Override
            public void onCallStateChanged(int state, String incomingNumber) {
            // the variable incomingNumber holds the number calling.
            // the state variable holds the state of the phone (Ringing, Idle ...)
              switch (state) {
              case TelephonyManager.CALL_STATE_RINGING:
                  Log.e("Incoming_call", incomingNumber+" is calling me ...");
                  break;
                case TelephonyManager.CALL_STATE_OFFHOOK:
                    KeyEvent eventDown = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_1);
                    dispatchKeyEvent(eventDown);
                  // your logic here, right now the incoming caller is logged.
                  Log.e("Out Call", incomingNumber+" is calling me ...");
                break;
                default:
                break;
            }
            super.onCallStateChanged(state, incomingNumber);
           }
        };
        TelephonyManager phoneManager = (TelephonyManager) 
        this.getSystemService(TELEPHONY_SERVICE);
        phoneManager.listen(myCallListener,
        PhoneStateListener.LISTEN_CALL_STATE);
  • 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-06-04T06:38:25+00:00Added an answer on June 4, 2026 at 6:38 am

    It’s possible to programmatically make a call, and add DTMF tones and pauses as needed:

    Intent i = new Intent("android.intent.action.CALL",Uri.parse("tel://" + number + ',' + dtmf));
    

    It is not possible to decide in the middle of the call to insert DTMF tones into the audio uplink, although it is a requested feature.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey guys, I want to store a categorized list of URLs. This is an
Hey i want to create a list like this. The pic below isnt my
hey guys i want to fetch 3 tables in 1 single ado.net call from
hey I want to make a call from my application, so far I found
hey every one I want to alert value of n from this string $('.orbit-bullets:has(
Hey guys I'm currenlty working on something and I want if I click a
Hey guys i wrote a quick test. I want delete to call deleteMe which
Hey guys, I got this JS code and want to add a slight fade
Hey I want to create a layout like this for my application. Of course
Hey i have developed android application . Now at this stage i want to

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.