omkar.ghaisas
omkar.ghaisas

Reputation: 245

Automatically open dialpad on incoming / outgoing call

I was thinking of making a small background utility, which detects when either phone receives an incoming call / user makes an outgoing call. Based on the action, the numeric dialpad is displayed automatically when the phone is taken away from the ear.

I know, how to detect the type of call, but then don't know, if it's possible to trigger an Intent action to ask android to open the dialpad programatically.

Pls suggest, if its possible and how.

Thanks Omkar Ghaisas

Upvotes: 0

Views: 2805

Answers (1)

vipin
vipin

Reputation: 3001

yes it is posible create a broad cast reciever liten for incoming call then in onrecieve write down this code it will open a dial pad

Intent dial = new Intent();
dial.setAction("android.intent.action.DIAL");
dial.setData(Uri.parse("tel:"));
dial.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); 
context.startActivity(dial);

and for broadcast and services read this http://www.vogella.de/articles/AndroidServices/article.html

also check

http://androidsourcecode.blogspot.in/2010/10/blocking-incoming-call-android.html

Upvotes: 1

Related Questions