views:

55

answers:

2

Hi All,

I would like to know if we can get Incoming call data to the application in Android.

I will be using this incoming call data to record the call or for the purpose of call streaming from my application.

I read Audio manager and Telephony manager class provided by Android , but I could get an API which can give the data of incoming call.

Any help in this regard will be highly appreciated.

Thanks and Regards Pavan

A: 

Not possible for regular calls (GSM, CDMA, etc.). For VoIP calls technically it is possible, provided that you have access to the stack.

Sun Jian
A: 

Set the Audio Source of Mediarecorder object to Voice Call.

final MediaRecorder recorder = new MediaRecorder();
recorder.setAudioSource(MediaRecorder.AudioSource.VOICE_CALL);
recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
recorder.setOutputFile(path);
Rohan K
This is known for not working. Have you tested it on any phone?
Sun Jian
Even I read in some places that the recording with VOICE_CALL options does not work , I am not sure. Kindly let e know if any one has tested it.
pavan
It is working on my device . It has Android 2.1
Rohan K