Call recording does not work in marshmallow and above

Another end voice cannot record. * All permissions allowed. It works great on One Plus Three and some other devices.

it mostly happens 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 on this?

Thank you in advance

+3


source to share


1 answer


Set your audio source to be MediaRecorder.AudioSource.VOICE_CALL. But it may not work on all devices over Marshmallow. We need android.permission.CAPTURE_AUDIO_OUTPUT permission for it to work on marshmallow devices. But it is provided to system applications only for the moment.



0


source







All Articles