Reputation: 272
not able to record calls in android 10+ phones
recorder = MediaRecorder()
recorder.setAudioSource(MediaRecorder.AudioSource.VOICE_COMMUNICATION)
recorder.setOutputFormat(MediaRecorder.OutputFormat.AMR_NB)
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB)
recorder.setOutputFile(path)
recorder.prepare()
recorder.start()
Upvotes: 1
Views: 110