I am developing an Android
app for recording calls.
This is my code snippet.
recorder = new MediaRecorder();
recorder.setAudioSource(MediaRecorder.AudioSource.DEFAULT);
recorder.setOutputFormat(MediaRecorder.OutputFormat.DEFAULT);
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC);
recorder.setOutputFile(file_path);
This is working perfectly for devices below android 7, but when I use Android 7 mobile devices I can hear only outgoing voice but cannot hear incoming voice.
Can anyone help me in fixing it?
If there is no sound in your call/surround voice recordings, then you need to set the voice recorder to "Stereo" mode on Samsung phones.
Please make sure that Cube app is up to date and that 'Cube ACR App Connector' is switched on in the app settings - miscellaneous. Set phone recording audio source to 'voice recognition (software)' and increase the recording clarity in the app settings - recording.
You can also try tapping on the speaker to see if this improves the call volume. During a voice call, press the volume button located on the left side of your device, and then tap on the drop down arrow to open the volume settings. Tap and drag the Call volume bar to the end to maximise the Call volume settings.
Use VOICE_COMMUNICATION
as AudioSource as it is
microphone audio source tuned for voice communications such as VoIP, as described on Android Developers site.
I tried using VOICE_CALL
(Uses audio uplink and downlink recording) but it can be used only by system components only, So mic is only option to record audio.
TRY:
1: Sliding up the volume during call.
2. DO NOT use headphones as audio will not be recorded by mic in some cases[Haven't tried this].
3. Works on Moto G4 Play, Android version 7.1.1(most of Motorola phones have two mics):
recorder.setAudioSource(MediaRecorder.AudioSource.VOICE_COMMUNICATION);
recorder.setOutputFormat(MediaRecorder.OutputFormat.AMR_NB);
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With