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
688 stars 286 forks source link

Google Chrome not shows the "access to camera" prompt after version 122 #464

Open zeitungen opened 6 months ago

zeitungen commented 6 months ago

Describe the bug Trusted Web Activity after Google Chrome version 122 no longer shows the "access to camera" prompt. However, the same web application opened directly in Chrome still works well and the prompt appears. Other informations, same application not trusted (app displays the navigation bar), the prompt also appears. With Firefox, the prompt is displayed.

This issue is also documented on stackoverflow

To Reproduce Steps to reproduce the behavior:

  1. Install Attrius Facilities app
  2. Click on 'Enter offline mode'
  3. Click on + button (located to bottom right of the screen)
  4. Enter a name ('A' for example) and save
  5. Click on new item (A) into the list
  6. Click on + button (located to bottom right of the screen)

Expected behavior A barcode scanner appears. For the first time, a camera prompt should appears.

Did this ever used to work With chrome <122 installed, the camera prompt appears With not trusted app and the navigation bar displayed, the camera prompt appears. Navigate with chrome to the web site, the camera prompt appears.

Screenshots into android app, no camera prompt image

into chrome, camera prompt is displayed image

Smartphone (please complete the following information):

Device OS Browser Browser version android-browser-helper library version
Samsung Galaxy A53 Android 14 Chrome 122.0.6261.105 2.5.0
Google Pixel 6 Android 14 Chrome 122.0.6261.105 2.5.0
Samsung Galaxy S8 Android 9 Chrome 122.0.6261.90 2.5.0
khelben5 commented 6 months ago

Hello, everyone. We at GoodNotes are also experiencing a very similar issue. We have prepared a basic example in this repository with instructions on reproducing it. I hope it helps bring light into the problem.

khmyznikov commented 5 months ago

Same for microphone

khmyznikov commented 5 months ago

Raised this as bug in chromium: https://issues.chromium.org/issues/330175031

woodreamz commented 5 months ago

Raised this as bug in chromium: https://issues.chromium.org/issues/330175031

Thank you for raising it! It seems to be a regression introduced in v122, they are investigating the issue.

tomayac commented 5 months ago

It seems this was fixed via https://chromium-review.googlesource.com/c/chromium/src/+/5381675.