BarCodeScanner size on Android


#1

Hi,
i can’t set fixed width and height of BarCodeScanner component on Android… i’ve create a new project and paste this code:

The BarCodeScanner change dimensions… sometimes the black area is square, sometimes is rectangular (after app reload)

Thanks


#2

Hey @shork,

What SDK version are you developing with? This Snack must be quite old as it was pushed to SDK25 when I opened it. I upgraded it to SDK31, made the changes needed due to deprecations (no more torchMode and onBarCodeRead is changed to onBarCodeScanned) and I’m not experiencing any issues with the size changing.

Cheers,

Adam


#3

I use expo 31.0.2, i’ve this issue after upgrade expo from SDK30, only on Android devices