Search code examples
androidxamarinwebview

How to enable camera and mic access from WebView in Xamarin form Expanded Explanation


I have followed the instructions on creating a custom renderer for WebView found here. I have added permissions and I have created a class in the xxx.Droid project. As I am new to Xamarin, are there any other steps that I should also take? Do I have to register this class anywhere?

I have added permissions and I have created a class in the xxx.Droid project.


Solution

  • First, the xxx.Droid is the namespace of his project. If you want use the code you should create a Renderer class in your project in the .Android package.

    Second, I found a more particular article about Xamarin - Requesting camera permissions in WebView you can check this.

    UpGrade

    @Obsidian Delta had made his project to work. This is his project XamarinWebviewMicrophone.