I create a WebView and give it a link to the resource.

 web = (WebView) getActivity().findViewById(R.id.web); web.getSettings().setJavaScriptEnabled(true); web.loadUrl("http..."); 

When you go to the URL, an attempt is made to access the microphone, but WebView blocks this attempt. The question is how do I give permission to use the microphone for the web ?

    1 answer 1

    Register permission in Manifest :

     <uses-permission android:name="android.permission.CAPTURE_AUDIO_OUTPUT"/> 

    If you are using Android 6.0 or higher, you will have to ask for permission during the execution. Read more about this here - the official site.

    • Alas, it did not help - Heaven
    • @Heaven, but what does he write? - Rostislav Dugin
    • "Access to the microphone is denied. Check your browser settings" - Heaven
    • But at the same time there is a button that leads to the given url and there is a press of this button (that is, to make an explicit transition) everything goes successfully - Heaven