capacitor-community / barcode-scanner

A fast and efficient (QR) barcode scanner for Capacitor
MIT License
437 stars 169 forks source link

UI broken on Android since upgrade to Capacitor 4 #147

Closed heinerlamprecht closed 2 years ago

heinerlamprecht commented 2 years ago

Since upgrade to Capacitor 4 and version 3 of this plugin, the previous custom UI does not show up again on Android. The complete WebView is hidden (not even accessible through the Chrome debugger). Besides, the scanner now shows some information about the scanned code already while scanning.

On iOS, the behaviour is the same as before the upgrade.

Tested on Galaxy Tab A8 with Android 11

thegnuu commented 2 years ago

Unfortunately I am not able to reproduce this issue... Can you share a repo where I can reproduce your problem?

Without an implementation to debug it won't be possible for me to help you....

Squix commented 2 years ago

As for me, splashscreen (probably the new Android 12 one) is showing between the scanner UI and the camera view. Scanning is working (when a barcode is in front of the camera), even if nothing is visible.

thegnuu commented 2 years ago

You should be able to remove the splashscreen with some ionic plugins, have you already tested this?

thegnuu commented 2 years ago

Please check out this: https://github.com/capacitor-community/barcode-scanner#ionic-css-variables

If you still have issues, feel free to reopen this issue :)

Squix commented 2 years ago

I couldn't remove the new splashscreen with the splashscreen capacitor plugin. But I was able to revert to the old splashscreen by edtiting the android/app/src/main/res/values/styles.xml file, doing the contrary described here : https://capacitorjs.com/docs/updating/4-0#optional-use-the-new-android-12-splash-screen-api