Barcode scanner keeps repeating to open and close

I am making an app for my science fair project and I am stuck here. What I wanna do is, when a data is sent from my arduino/esp32 I want barcode scanner to open and scan but it just opens and closes doesn't give enough time for scanning. Actually, I don't want any interval, I just wanna open the barcode scanner once and then again if only my micro-controller has sent data. Any solution is appreciated!

When clock timer set clock enabled to false and see if it works for you


You have to disable the Clock.

1 Like

It stopped that problem but now it just opens scanner once. I have to restart the app and then again it scans just once.

How many times do you want it to scan?

Once data is received open scanner or clock enabled to true again

Actually as many times as I send data. And data will be sent if my ultrasonic distance sensor measures something less than 10 cm close.

As I said when data received try to enable clock again

Like this? I am building that apk right now. Let's see if it works and 1 more thing does it mean the clock will trigger after evry interval?

Screenshot 2022-03-19 131253

Yeah same problem as my last comment. Should I increase the interval to something like infinite that by that time I would close my application or anything else?

It enables though just that interval prblem

Actually, is there a way without using clock thingy...? I just wanna do.scan when .bytesAvailabletoReceive.