CallRecorder
CallRecorder copied to clipboard
Not recording calls , " ...could not access microphone..."
when at Kit Kat (4.4.4)
I'll need more information (i.e., logcat logs, which you should be able to get with adb logcat
, or the Catlog app if your device is rooted).
I know that this sometimes doesn't work for incoming calls on my device, but I haven't had the time to look at it closely and fix it yet.
please solve that issue with that snippet code in method. you want to change voice_call to voice_communication.
private void startRecording() {
Log.d(Constants.TAG, "RecordService startRecording");
if (recorder != null) {
recorder.release();
}
recorder = new MediaRecorder();
try {
recorder.setAudioSource(MediaRecorder.AudioSource.VOICE_COMMUNICATION);
@rajam1215: That seems like a more appropriate value, but VOICE_CALL
requires the CAPTURE_AUDIO_OUTPUT
permission, which is "Not for use by third-party applications." according to the Android docs.
In all phone. recorder.setAudioSource(MediaRecorder.AudioSource.VOICE_COMMUNICATION);
Its run perfectly,,,but in MI phone its want
recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
and in background app not run only in MI, OPPO, VIVO
how it solve