How to use camera and microphone, etc. in a normal web viewer?

Hi everyone!
I saw many topics on the forum about Camera and Microphone permissions in normal Kodular web viewer and that the web viewer couldn’t access the camera/microphone. But no one seemed to have a solution to it. So, I’ve got a solution for that using an extension: Web view Permission Handler. By using this extension, you can allow any site in web viewer to use your camera, microphone, etc.

So, here is how to do it:

Step 1: Download the required extensions
You have to download two FREE extensions:

  1. WebView Permission Handler extension at Niotron store (https://store.niotron.com/product/webview-permission-handler/)
    (Note: Just proceed with all the steps at the website. As it is a free extension, it will not ask for your payment details during checkout.)

  2. ListPermission extension by @jarlissonlira2 (ListPermission: with this extension it is possible to make a whitelist at once)

Step 2: Import the extensions
Import both the extensions into your project and drag and drop them like you normally do.

Step 3: Set up blocks
Now that you are done with the Designer window, let’s move to the blocks section.
These blocks are for using two things in web viewer, Camera and Microphone. You may adjust your requirement by playing with the permission related-blocks.

Step 4: Install app
Install the app on your phone and grant the asked permissions (here, for Camera and Mic)

Step 5: Testing
Now, to test whether camera and microphone is working or not in the web viewer, go to this website: https://webcammictest.com/ (Note: This website is not owned by me, nor I’ve any relation with this website) or you can visit any such testing site you want.
For testing camera, make sure you have selected the ‘webcam’ icon on the website as shown in the image below:

Now, click on ‘Check webcam’ and the video from the camera should appear.

For testing microphone, make sure you have selected the ‘microphone’ icon on the website as shown in the image below:

Now, click on ‘Check microphone’ and speak something. The bars in the graph should rise and fall indicating that it is able to access your voice.

So, by following all these steps mentioned above, you can wonderfully allow the web viewer to access your camera as well as microphone. I hope this guide was useful for the readers.

You can reply to this thread if you face any issues implementing these steps or anything else while trying it.

AIA & APK file:

Thank you so much @jarlissonlira2 and Niotron (I don’t know who is the developer of the extension :sweat_smile:) for the wonderful extensions. Thanks to @Anirudh_Thakare too for addressing this problem to me which, in turn, triggered me to share this guide.

Thank you everyone for taking your time and reading this guide. I hope that this solves your issue regarding permissions in web viewer.
Also, Thank you Kodular for providing this extensive platform where we can help each other and expand our knowledge, besides creating apps which is of course the most awesome. :wink:

Have a great time ahead!! :smile:
~Vivek

5 Likes

Is it possible to use it along with web view full screen extension ?

I tried but when i use web view full screen extension these extensions were not functional :disappointed_relieved: :disappointed_relieved:

Only web view full screen extension was working !!!

1 Like

You should try CustomWebView extension.

2 Likes

But in custom Webview extension it doesn’t download the pdf directly which opens in new tab.

It opens in tab and the screen is white then starts downloading the pdf.

So i was using web viewer, is there any way to download the pdf (which opens in new tab) directly in custom Webview extension ?

1 Like

Disable Support multiple Windows and new tabs will not be requested.

2 Likes

Hi @Anu10,
I just tried using it with WebViewFullScreen extension. Yes, there is some bug or something due to which WebViewPermissionHandler extension becomes non-functional when WebViewFullScreen extension is used. I’ll report this issue to Niotron and if the bug gets solved, it will be reflected in the description section of the extension page: WebView Permission Handler | Niotron Store
Thanks!

2 Likes

But there is another error too. If you use WebViewFullScreen extension or WebViewPermissionHandler extension, then When WebViewer.ProgressChanged block doesn’t trigger/work.

2 Likes

file uploads do not work with this extension

Yeah! It still doesn’t support file uploading. :sweat: