how to record calls using MediaRecorder.AudioSource.VOICE_UPLINK

末鹿安然 提交于 2019-12-08 11:14:59

问题


I want to record calls only (But only my voice or the person who has my app installed) but VOICE_UPLINK is not working , but MediaRecorder.AudioSource.MIC is working and recording audio of both caller and recipient

I've tried :- sources as :- MIC , VOICE_CALL , DEFAULT , VOICE_COMMUNICATION , CAMCORDER , UPLINK , DOWNLINK

but Uplink and Downlink is not working

When I use Uplink or downlink my app misbehave while When I use other sources my app works fine


回答1:


It is due to permission

user-permission android:name="android.permission.CAPTURE_AUDIO_OUTPUT" >

Which is only granted to system apps , as VOICE_UPLINK and VOICE_DOWNLINK requires this permission 3rd party applications are not granted this permission

It also depend on manufacturer , which can restrict users from recording calls. It maybe done by hardware or software.

These are the two possible reasons I think why This ain't working



来源:https://stackoverflow.com/questions/56733296/how-to-record-calls-using-mediarecorder-audiosource-voice-uplink

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