Closed KarmaTechnolabs closed 1 year ago
Reinitialize MediaRecorder before mediaRecorder.prepare() i.e: mediaRecorder = new MediaRecorder(); mediaRecorder.setAudioSource(MediaRecorder.AudioSource.MIC); mediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP); mediaRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB); mediaRecorder.setOutputFile(filePath); mediaRecorder.prepare(); mediaRecorder.start();
just click on mic and then again try to click on mic getting crash on mediaRecorder.prepare(); AudioRecorder line 25