Can i get Camera access using CustomWebView Extension

I think you have to use this block too :flushed:
image

Yes you can.

That method only works when webview requests for permissions and triggers OnPermissionRequest event.
Also your app should also have same permission which you want to grant to webview.

It still doesn't work please help

Try adding the AppInventor Camera component to get permission.

Also, if your test fails under the Companion, try again with an APK.

My website needs camera access from the browser if I use this site on chrome this works but on CustomWebView I'm not getting a pop-up to allow the camera. That's my code and website
https://tcbvideochat.000webhostapp.com

S

This is an universal solution:

Also mostly websites need these permissions:


But why your blocks look different.

Error while using this app-:

Because you did not allow that permission.
Tap on allow when permissions are asked.

pop-up not showing that's why I use camera component and call it on button click so this will ask for permission. then I allow camera permission, but still doesn't work,
I'm doing something wrong?... please review my code.
Thank You
That's my code

Which version are you using?
Make sure you use latest version.

Also post an apk and aia.

Version updated still doesn't work Here is my aia file. webviewextended (1).aia (78.3 KB)

Me too don't know why

Have you tested with latest version v10 ? If not download it from GitHub

1 Like

Try asking for permission manually when needed.
You can also use your own logic.
Copy-pasting is not a reliable solution.

I also tested. In the application settings, the permissions are granted to:

  • camera
  • location
  • microphone
  • storage

After starting the application, the error message 908 shown above still appears. Of course, version 10 of the extension.

:thinking:
Show your blocks.
Also note that when you grant permission to webview then it is only granted to current webview so if you create another webview and visit same page, it will need those permissions again.

I tried it didn't work

What I want is for the code to visit Kingex.xyz/app
And grant it camera ,storage and Microphone permission

Ok, I'll check as soon as possible.

1 Like

Thank you alot