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();
MediaRecorder.AudioSource.VOICE_CALL
instead of MediaRecorder.AudioSource.VOICE_COMMUNICATION
–
Pinter Check this out...
http://androidforums.com/android-lounge/181663-android-phone-call-recording-function.html
The short answer is... Get a Galaxy S, preferably the South Korean version.
As far as I know, all the applications that record voice calls on Android have the same problem: they only work on some phones, while on other phones you can only hear one side of the conversation. Some of these apps try to solve this problem by recording from the microphone as well.
If you have root permissions on your Android phone, then I believe there are apps that work better because they have access to the lower level streams, as Emmanuel specified in his answer.
I dont know if its possible but as far as API goes
recorder.setAudioSource(MediaRecorder.AudioSource.VOICE_CALL);
this line compiles well in my code where recorder is an Object of MediaRecorder and I was once working on such project but later the project was dumped so not sure if it works or not
You can't record a phone conversation on Android. The streams are in the lower level operating system and are not accessible in the application level. Sorry.
The API is apparently there, but makers have disabled their radio firmware from being able to do this.
Depends on phone to phone e.g. You cannot record a call on nexus and motorola phones as they do not allow recording from mic till the call is on going. But the same recording from mic while on call works on most samsung and galaxy devices.
I am afraid of knowing android doesn't have a native api to record voice calls. even the streams are abstracted in Operating System and inaccessible in application layer as Emmanuel hase stated. I consider it as a Serious mistake of Android Devs. if a security Wall have one tiny Hole its not secure any more. So even if droid restricts or tries to restricts there exists other phones where one can have such kind of functionality. even a custom droid kernel can have such kind of functionality. This only makes droid Users poor nothing else.
© 2022 - 2024 — McMap. All rights reserved.