Pra*_*ara 37 android phone-call voice-recording
如果您知道如何录制语音,请帮助我,并在通话期间记录来电者和来电者的语音.如果有人知道那么给我一个提示.
Abh*_*kra 10
是的,可以这样做
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!");
}
Run Code Online (Sandbox Code Playgroud)
停止你可以使用
callrecoder.stop();
Run Code Online (Sandbox Code Playgroud)
小智 8
看一下这个...
http://androidforums.com/android-lounge/181663-android-phone-call-recording-function.html
简短的回答是......获得Galaxy S,最好是韩国版.
据我所知,在Android上录制语音通话的所有应用程序都存在同样的问题:它们只能在某些手机上运行,而在其他手机上,您只能听到对话的一方.其中一些应用程序也尝试通过麦克风录制来解决此问题.
如果您的Android手机拥有root权限,那么我相信有些应用程序可以更好地运行,因为他们可以访问较低级别的流,正如Emmanuel在他的回答中指出的那样.
您无法在Android上录制电话对话.这些流位于较低级别的操作系统中,无法在应用程序级别访问.抱歉.
我不知道它是否可能,但就API而言
recorder.setAudioSource(MediaRecorder.AudioSource.VOICE_CALL);
Run Code Online (Sandbox Code Playgroud)
这行在我的代码中很好地编译,其中recorder是MediaRecorder的对象,我曾经在这样的项目上工作,但后来项目被抛弃,所以不确定它是否有效
| 归档时间: |
|
| 查看次数: |
64533 次 |
| 最近记录: |