I am working on the Android Call Recording App. It is working fine in some of the devices (MI 3S, HTC Desire 620,OPOO etc.) but getting problems with Samsung Galaxy S7. Remote Voice is not recording in Samsung Galaxy S7. When I am using the ACR this app is working fine. So, basically I want to know what they are using in ACR app that is missing in my Call Recording App. I tried the App using the different options for AudioSource
, OutputFormat
and AudioEncode
but all in vain.
Please help me to find out this problem.
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();