Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Couldn't hear incoming voice in recorded calls in android 7?

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?

like image 795
Sudarshana Dayananda Avatar asked Nov 22 '17 13:11

Sudarshana Dayananda


People also ask

Why can't I hear a recorded call?

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.

Why Cube ACR is not recording incoming voice?

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.

Why can't I hear when someone calls me on my Android phone?

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.


1 Answers

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);

like image 98
global_warming Avatar answered Sep 21 '22 07:09

global_warming