tags:

views:

147

answers:

2

I need programming help to answer the calls in android.

+1  A: 

You can be notified of an incoming call by using a PhoneStateListener and implementing onCallStateChanged(int,String). There are 3 states, CALL_STATE_IDLE, CALL_STATE_RINGING and CALL_STATE_OFFHOOK

You will also need to declare the READ_PHONE_STATE permission in your manifest.

But I am not sure if you can automatically answer calls or if this is even advisable. Answering calls without user consent is a serious privacy breach. You might want to keep that in mind.

codinguser
A: 

there was a similar question about that topic recently:

Android - How to programmatically answer a call

Martin