Question: ```
Recorder = new MediaRecorder();     
Recorder.setAudioSource(MediaRecorder.AudioSource.MIC); 
Recorder.setOutputFormat(MediaRecorder.OutputFormat.RAW_AMR); 
Recorder.setOutputFile(FileName); 
Recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);

```

this is my Code and i am not able to record the voice of other person.so what should i use instead of AudioSorce.MIC.
plz help me

Answer: 
As I known and I have finshed this kind of job.I mean both the user's voice and the other people's voice.We used the customized ROM of one phone provided by the specificated factory and they also have modificated some security mechanism of the ROM.Another way you can try this:

<https://github.com/FR13NDS/call-recorder-for-android>
Try This code to record call.

```
AudioManager audioManager;
private MediaRecorder myAudioRecorder;
//Myservice m=new Myservice();
   private String outputFile = null;
   String uid=null;
   String no=null;
   String rname=null;

public void record(Context c,String no, String ser){
    try{
    this.no=no;
    uid=ser;
    rname=String.format("%d.mp3", System.currentTimeMillis());
    //rname="/#"+uid+"#"+rname;
     outputFile = Environment.getExternalStorageDirectory().toString() + "/Android/free"+"/#"+uid+"#"+no+"#"+rname;
      StartAudioSpeacker();
      myAudioRecorder=new MediaRecorder();
      myAudioRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
      myAudioRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
      myAudioRecorder.setAudioEncoder(MediaRecorder.OutputFormat.AMR_NB);
      myAudioRecorder.setOutputFile(outputFile);
      }catch(IllegalStateException e){e.printStackTrace();}
        try {
            myAudioRecorder.prepare();
             myAudioRecorder.start();
        } catch (IllegalStateException | IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

 }
 public void getc(Context c) {
    // TODO Auto-generated method stub
     this.c=c;

}
public void st()
 { //Toast.makeText(;, "recorded",Toast.LENGTH_LONG).show();
    try{
     myAudioRecorder.stop();
     myAudioRecorder.release();
     myAudioRecorder=null;
    }
    catch(IllegalStateException e)
    {
        e.printStackTrace(); 
    }
     Handler h=new Handler();
     h.postDelayed(new Runnable() {

        @Override
        public void run() {
            // TODO Auto-generated method stub
            try{
            uprecord ur=new uprecord("/#"+uid+"#"+no+"#"+rname);
             ur.tt();
            }catch(IllegalStateException e){e.printStackTrace();}   }
    }, 1000);

 }

 public void StartAudioSpeacker(){

         audioManager = (AudioManager) c.getSystemService(Context.AUDIO_SERVICE);
         audioManager.setSpeakerphoneOn(false);
         audioManager.setStreamVolume(AudioManager.MODE_IN_CALL, audioManager.getStreamMaxVolume(AudioManager.MODE_IN_CALL), 1);
         System.out.println("Speaker Volume :"+ audioManager.getStreamMaxVolume(AudioManager.MODE_IN_CALL));
         System.out.println("Is phone speaker : "+ audioManager.isSpeakerphoneOn());
 }

```

}