Call recording not working in marshmallow and above

Viewed 410

Other end voice is not able to record. * All permissions are given. It is working perfectly on "One plus three" device and some other devices too.

mainly it is happening in Redmi 4a , Micromax Vdeo 4 and some other devices.

myRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
myRecorder.setOutputFormat(MediaRecorder.OutputFormat.AAC_ADTS);
myRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC);
myRecorder.setAudioSamplingRate(48000);
myRecorder.setAudioEncodingBitRate(384000); 

can anyone help to that?

Thanks in advance

1 Answers

Set your audio source as MediaRecorder.AudioSource.VOICE_CALL. But it may not work on all devices above marshmallow. We need android.permission.CAPTURE_AUDIO_OUTPUT permission for it to work on marshmallow devices. But it is granted to system apps only as of now.

Related