三星 Galaxy S7 中的 Android 通话录音

Vik*_*man 6 android

我正在开发 Android 通话录音应用程序。它在某些设备(MI 3S、HTC Desire 620、OPOO 等)上运行良好,但在三星 Galaxy S7 上出现问题。远程语音未在三星 Galaxy S7 中录音。当我使用 ACR 时,这个应用程序运行良好。所以,基本上我想知道他们在我的通话录音应用程序中缺少的 ACR 应用程序中使用了什么。我尝试了使用不同选项的应用程序AudioSourceOutputFormat并且AudioEncode但一切都是徒劳。

请帮我找出这个问题。

recorder = new MediaRecorder();
recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
recorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
recorder.setAudioSamplingRate(8000);
recorder.setAudioEncodingBitRate(12200);
recorder.setOutputFile(audiofile.getAbsolutePath());
try {
    recorder.prepare();
} catch (IllegalStateException e) {
    e.printStackTrace();
} catch (IOException e) {
    e.printStackTrace();
}
recorder.start();
Run Code Online (Sandbox Code Playgroud)