Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

answer incoming phone call from my application

Tags:

android

I want to make my application answer the phone calls so I can have the ability to do some processing before allowing the user to answer maybe just display my activity over the InCallScreen but I can't accomplish this. when I used intentFilter with <action android:name="android.intent.action.ANSWER"></action> when incoming call the InCallScreen start and not my activity and when using broadcastReciever with <action android:name="android.intent.action.PHONE_STATE"></action> I can't use abortBroadcast() method because its non-ordered broadcast.
Any help please

EDIT 1
I managed to display my activity over the InCallScreen by wait 1 second before starting my activity in onReceive of broadcastReceiver method but the InCallScreen is displayed first for portion of time which may allow the user to answer before the processing start and if I reduced the time to wait this may cause InCallScreen to be displayed above my activity. Any other solution will be appreciated.

like image 471
Amal Avatar asked May 16 '11 18:05

Amal


1 Answers

Check out Tedds Droid Tools. It talks about programmatically answering calls. Specifically, you want to look at the Features portion of the Readme.

like image 147
advantej Avatar answered Nov 15 '22 00:11

advantej