GoogleChrome / android-browser-helper

The Android Browser Helper library helps developers use Custom Tabs and Trusted Web Activities on top of the AndroidX browser support library.
Apache License 2.0
695 stars 289 forks source link

Camera and Mic not accessible #309

Open varundabke opened 3 years ago

varundabke commented 3 years ago

Describe the bug TWA WebView Fallback lacks ability to access camera and microphone. During Pandemic many organizations are using Audio / Video chat in their app. This issue is a show stopper for them.

To Reproduce Steps to reproduce the behavior:

  1. Create TWA which uses Camera / Microphone & install on your phone ( using www.pwabuilder.com )
  2. Uninstall / Disable all other browsers on phone.
  3. Launch the app
  4. Webview will open , but camera and mic functionality will not be available Expected behavior WebView fall back must be coded to handle Camera, Mic , Gelocation and similar services by default.

Did this ever used to work No

Screenshots

Code Snippets Solution to this as described below must be included by default in webview fallback: https://stackoverflow.com/questions/40659198/how-to-access-the-camera-from-within-a-webview

Smartphone (please complete the following information):

Additional context Will be happy to help if anything I can do

kudlav commented 2 years ago

And here are necessary steps for enabling mic: https://stackoverflow.com/questions/40236925/allowing-microphone-accesspermission-in-webview-android-studio-java

(This is just a note for developers. Probably the only solution is use customtabs instead and wait for the fix.)