Problem accessing system microphone

Hy,

in my App i´m using the AudioRecorder Plugin (Plugin.Audiorecorder).
When i run the App with this simple code
try
{
await _recorder.StartRecording();
}
catch(Exception ex)
{
await App.Current.MainPage.DisplayAlert("Error", ex.ToString(), "OK");
}

i get the following error message:
"System Exception: Unable to successfully initialize AudioRecord; reporting State.Uninitialized. If using an emulator make sure it has access to the system microphone."

I get this message independent whether i´m using the App in the VS emulator or directly on my phone.
I can´t find any options to activate mic access in the emulator.

So does anyone else facing this problems?

Answers

  • MatteoFeMatteoFe ITMember
    edited November 9

    Do you ask for correct permission?

    The following permissions are required:
    "android.permission.MODIFY_AUDIO_SETTINGS"
    "android.permission.READ_EXTERNAL_STORAGE"
    "android.permission.WRITE_EXTERNAL_STORAGE"
    "android.permission.RECORD_AUDIO"

  • Hy, yes i did.
    The problem was that i also have to activate the rights in the app settings on my mobile.
    After that all works fine.

Sign In or Register to comment.