In my application there is a feature to record voice calls and it works perfectly well. But when tested on (Samsung s7, s8 ) it doesn’t work well. The application is able to record only callers voice not the voice from the other end. Below is my code to check please suggest a solution
MediaRecd = new MediaRecorder();
MediaRecd.setAudioSource(MediaRecorder.AudioSource.VOICE_CALL
);
MediaRecd.setAudioChannels(ConstantVariables.audioChannels);//monoRecording
MediaRecd.setAudioEncodingBitRate(64);
MediaRecd.setAudioSamplingRate(44100);
MediaRecd.setOutputFormat(output_formats[pos]);//.mp3
MediaRecd.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);//I already try with all possible CAMCORDER , MIC , Default etc etc but none was working
MediaRecd.setOutputFile(Currentfilename);
try {
MediaRecd.prepare();
MediaRecd.start();
} catch (Exception e) {
MediaRecd.reset();
MediaRecd.release();
MediaRecd = null;
}
Please help