In android is it possible to record voice call during incoming/outgoing calls without open the speaker of mobile. I had seen a application in the android market. It does not cor
You need use MediaRecorder class as follows,
recorder = new MediaRecorder();
int audioSource = MediaRecorder.AudioSource.VOICE_CALL;
recorder.setAudioSource(audioSource);
recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
final String filePath = Environment.getExternalStorageDirectory() + "/record.3gpp";
final File file = new File(filePath);
file.getParentFile().mkdirs();
recorder.setOutputFile(filePath);
recorder.prepare();
recorder.start(); // Recording is now started