How can I record voice and record Call in Android?

Please help me if you know how to record voice, and also to record the voice of both caller and calle during a phone call. If anybody knows then give me a hint.


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();

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.


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.

链接地址: http://www.djcxy.com/p/75452.html

上一篇: 将语音呼叫包记录在一个文件中

下一篇: 如何在Android中录制语音和录制通话?