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


BarCodeScanner screen on Android
#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


#4

same here on android with expo 31.0.6. Container size doesn’t do anything. Scanner camera view is way bigger. Works fine on iOS.


closed #5

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.