Please help me if you know how can record outgoing and incoming call in android
Yes It is possible just do this
final MediaRecorder callrecorder = new MediaRecorder();
callrecorder.setAudioSource(MediaRecorder.AudioSource.VOICE_CALL);
callrecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
callrecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
callrecorder.setOutputFile(filepath);
try {
callrecorder.prepare();
} catch (IllegalStateException e) {
System.out.println("An IllegalStateException has occured in prepare!");
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
//throwing I/O Exception
System.out.println("An IOException has occured in prepare!");
// TODO Auto-generated catch block
e.printStackTrace();
}
try {
callrecorder.start();
} catch(IllegalStateException e) {
e.printStackTrace();
//Here it is thorowing illegal State exception
System.out.println("An IllegalStateException has occured in start!");
}
for stopping you can use
callrecoder.stop();