Q:

Android can't record incoming calls with clear voice

I can only record my voice from this code, not against the turns.
And I used MediaRecorder.AudioSource.VOICE_CALL instead of MediaRecorder.AudioSource.MIC
But still I am getting my voice only.
Here is my code
public class RecorderService extends IntentService {

    private Context mContext;
    private MediaRecorder recorder;
    static final String TAGS = "RecorderService";

    private String phoneNumber;

    public RecorderService() {
        super("RecorderService");
    }

    @Override
    protected void onHandleIntent(Intent intent) {
    }

    @Override
    public int onStartCommand(@Nullable Intent intent, int flags, int startId) {
        Log.e(TAGS, "Started!");
        mContext = getApplicationContext();

        phoneNumber = intent.getStringExtra("number");
        Log.e(TAGS, "Calling Number : " + phoneNumber);

        recorder = new MediaRecorder();
        startRecording();

        return START_NOT_STICKY;
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        Log.e(TAGS, "Stopped!");
        stopRecording();
    }

    private void startRecording() {
        Log.e(TAGS, "Recording Started");

        File file = new File(Environment.getExternalStorageDirectory()
                + File.separator
                + "My Records"
                + File.separator);

        recorder.reset();
        recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
        recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
        recorder.setAudioEncoder(MediaRecorder.AudioEncoder.DEFAULT);
        recorder.setOutputFile(file.getAbsolutePath() + "record.mp3");

        try {
            recorder.prepare();
        } catch (IOException e) {
            e.printStackTrace();
        }
        recorder.start();
    }

    private void stopRecording() {
        Log.e(TAGS, "Recording Stopped");
        if (recorder != null) {
            recorder.stop();
            recorder.reset();
            recorder.release();
            recorder = null;
        }
    }
}

Any suggestions!

A:

You can't.  Not unless you're a system app (which you need to be installing your own custom OS or be root to get).  VOICE_CALL requires the CAPTURE_AUDIO_OUTPUT permission which is a system permission-  normal apps can't use it.
How do the other apps on the Play store do it? They use the mic, and hope the output of the call is loud enough to pick it up.

