Babasaheb
Babasaheb

Reputation: 703

How to make key presses on dial pad, programmatically?

I have to write a program to call, using call card. My questions are: 1. How to know phone is ringing and received at the receiver's end.(e.g. At service provider like 1800). 2. After received I want to make key presses for desired number on dial pad in program. (or if any way to make key press events and append call to first one(e.g.1800), please tell!).

if any idea to append call to SP's number, please Help!

Upvotes: 0

Views: 1337

Answers (2)

Vineet Shukla
Vineet Shukla

Reputation: 24021

to make call programmatically:

Intent call = new Intent(Intent.ACTION_CALL);
        call.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        call.setData(Uri.parse("tel:" + number));
        startActivity(call);

add this permission to your manifest file:

<uses-permission android:name="android.permission.CALL_PHONE" />

Upvotes: 2

CommonsWare
CommonsWare

Reputation: 1006554

After received I want to make key presses for desired number on dial pad in program. (or if any way to make key press events and append call to first one(e.g.1800), please tell!).

This is not possible, sorry.

Upvotes: 0

Related Questions