I have a call recording app. I am using CallRecordingservice to record voice through AudioSource.VOICE_COMMUNICATION
in Android 8 (Oreo) , 6 and below working with some device but not in Android 7
I just found that something related to 7 that Android 7 has some security protocols and we have to overrite libmedia.so
using NDK.
Note : I have tested 6.0 Devices and below versions also. For Nougat(7) device i have tested with Motorola G5 and Motorola G4 .
Same issues found here : Call Recording Issue 7.1.1
recorder.setAudioSource(MediaRecorder.AudioSource.VOICE_COMMUNICATION);
recorder.setOutputFormat(MediaRecorder.OutputFormat.AMR_NB);
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
来源:https://stackoverflow.com/questions/51843495/call-recorder-not-working-on-7-1-1-others-side-person-voice-is-not-recording