i searched to check if this question is no dup , i see some has no answer and others did not help.
this is my code :
private void startRecording()
{
In my case that error (MediaRecorder: start failed: -38
) was appearing after switching to second camera when I forgot to release MediaRecorder during closing (first) camera:
mediaRecorder?.release()
mediaRecorder = null
Found the solution , it appears i had some other service in the background which is using AudioRecord and uses the mic as well.... so thats the -38 :)