I am new to android development. I am just trying to record an audio with android studio(2.1.1) testing with 6.0.1 Marshmallow device.
public class MainActiv
Try this.Hope it helps you
change recorder.setAudioSource(1); to recorder.setAudioSource(MediaRecorder.AudioSource.MIC); in your startRecord method.