Call recorder not working in android 10 (Q)

喜夏-厌秋 提交于 2020-02-25 04:13:33

问题


Call recorder is recording blank for the duration in Android 10 (Pixel 3A). It was working fine for all phones till Android 8 and in Android 9 most phones were recording only one side voice (however it was working fine in pixel 3A)

Is there any way to record calls in Android 10?

The below code doesn't seem to be working anymore.

    int audioSource = MediaRecorder.AudioSource.VOICE_CALL;
    mediaRecorder.setAudioSource(audioSource);
    mediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
    mediaRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC);
    mediaRecorder.setAudioEncodingBitRate(32);
    mediaRecorder.setAudioSamplingRate(44100);
    mediaRecorder.setOutputFile(MediaUri);
    mediaRecorder.prepare();
    mediaRecorder.start();

If SDK 28 or below is used call recording happens for the whole duration but without any voice. If SDK 29 is used call recording fails at the beginning saying check available audio from callback.

I hope its a bug in Google Android 10 and some patch will fix it.


回答1:


As per Google's new permission policy no other third party apps (Except system apps) can record calls from Android 9 Pie.

This change will not affect previous recordings or call recording in general.




回答2:


It's possible using Accessibility Service.

Cube call recorder records perfectly both side voice in Android 10 (Pixel 3A) without having to root or being a system app.

Detailed info here in this link.



来源:https://stackoverflow.com/questions/58230181/call-recorder-not-working-in-android-10-q

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!