CallRecorder icon indicating copy to clipboard operation
CallRecorder copied to clipboard

Not recording calls , " ...could not access microphone..."

Open fenix011 opened this issue 8 years ago • 4 comments

when at Kit Kat (4.4.4)

fenix011 avatar Nov 30 '16 11:11 fenix011

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.

ShadowNinja avatar Dec 04 '16 02:12 ShadowNinja

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 avatar Dec 16 '17 10:12 rajam1215

@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.

ShadowNinja avatar Dec 22 '17 02:12 ShadowNinja

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

rajam1215 avatar Dec 22 '17 07:12 rajam1215