# Barcode Scanner: premature "activation"

**URL:** <https://community.thunkable.com/t/barcode-scanner-premature-activation/1938942>\
**Category:** Feature Requests\
**Created:** [June 24, 2022, 1:47pm UTC](https://community.thunkable.com/t/barcode-scanner-premature-activation/1938942 "2022-06-24T13:47:29Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![tonyb2](https://avatars.discourse-cdn.com/v4/letter/t/c67d28/32.png) [@tonyb2](https://community.thunkable.com/u/tonyb2)\
**Post date:** [June 24, 2022, 1:47pm UTC](https://community.thunkable.com/t/barcode-scanner-premature-activation/1938942/1 "2022-06-24T13:47:29Z")

</div>

The Barcode scanner is great for QR Codes as they have inbuilt redundancy and error correction.  
However, for barcodes, I have discovered that the Thunkable barcode scanner goes off prematurely and may only get half of the bar code. In the real world this is a serious challenge.  
Can something be done about this in terms of looking at error checking / correcting, check digit validation and bar code type etc. to minimise false reads?  
The scanner needs to see non-striped “whitespace” on either side of the barcode before it makes a determination.  
Please advise if and when this will be possible.  
Thanks a mill.

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [June 24, 2022, 9:25pm UTC](https://community.thunkable.com/t/barcode-scanner-premature-activation/1938942/2 "2022-06-24T21:25:12Z")

</div>

Can you share a minimal app reproducing the issue?

---

<div class="post-metadata">

**Author:** ![tonyb2](https://avatars.discourse-cdn.com/v4/letter/t/c67d28/32.png) [@tonyb2](https://community.thunkable.com/u/tonyb2)\
**Post date:** [June 25, 2022, 4:37am UTC](https://community.thunkable.com/t/barcode-scanner-premature-activation/1938942/3 "2022-06-25T04:37:46Z")

</div>

Hi Muneer  
Thanks for your reply.  
I’ve uploaded a pic of the barcode and of the scan - which scanned incorrectly. ie: If the camera only gets a partial view of the code as it slow comes into frame.

 ![BarCode](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/e/eee9d89b80035a960103a92ab623f7ef706dacb5.jpeg)  
 ![BarCodeScan](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/6/46d06af4a3071839260caf53f33091182c42fd13.jpeg)

Here is the link: [Thunkable](https://x.thunkable.com/projectPage/62b687408d744a00114aed5a)

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [June 25, 2022, 4:20pm UTC](https://community.thunkable.com/t/barcode-scanner-premature-activation/1938942/4 "2022-06-25T16:20:15Z")

</div>

It works for me in an iPhone 11, getting the full barcode. What device are you testing it on? Do you have a different device you can try?

---

<div class="post-metadata">

**Author:** ![tonyb2](https://avatars.discourse-cdn.com/v4/letter/t/c67d28/32.png) [@tonyb2](https://community.thunkable.com/u/tonyb2)\
**Post date:** [June 26, 2022, 3:58am UTC](https://community.thunkable.com/t/barcode-scanner-premature-activation/1938942/5 "2022-06-26T03:58:10Z")

</div>

I’m using a Huawei P30 which has an exceptionally good camera. I’m also testing on a Hisense P50 (Android), which doesn’t have such a good camera but manages. I’ve picked up the issue on both. The barcode reader works 95% of the time but glitches out every now and then. I’ve seen it get confused when you scan it upside down. Also some barcodes work worse than others. So if you try a few variations and also try only half the barcode or slide it into frame slowly. Every now and then it gets the wrong code.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [June 26, 2022, 5:37am UTC](https://community.thunkable.com/t/barcode-scanner-premature-activation/1938942/6 "2022-06-26T05:37:45Z")

</div>

It’s tricky when I can’t replicate the issue on my device. Hopefully someone else has a similar device that they can test the barcode reader with.

When I use my phone and scan a few different barcodes at all sorts of angles (even upside down) and also when moving the barcode slowly into the camera frame, it gets the correct barcode value every time.

---

<div class="post-metadata">

**Author:** ![tonyb2](https://avatars.discourse-cdn.com/v4/letter/t/c67d28/32.png) [@tonyb2](https://community.thunkable.com/u/tonyb2)\
**Post date:** [June 26, 2022, 5:43am UTC](https://community.thunkable.com/t/barcode-scanner-premature-activation/1938942/7 "2022-06-26T05:43:34Z")

</div>

Thanks for following up. We’ll see how it goes.

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [June 27, 2022, 8:01pm UTC](https://community.thunkable.com/t/barcode-scanner-premature-activation/1938942/8 "2022-06-27T20:01:00Z")

</div>

I tried your project many times and it always gets the correct code. I use OPPO Android device.

---

<div class="post-metadata">

**Author:** ![tonyb2](https://avatars.discourse-cdn.com/v4/letter/t/c67d28/32.png) [@tonyb2](https://community.thunkable.com/u/tonyb2)\
**Post date:** [June 28, 2022, 4:16am UTC](https://community.thunkable.com/t/barcode-scanner-premature-activation/1938942/9 "2022-06-28T04:16:09Z")

</div>

Hi Muneer  
Thanks for trying. Did you try various kinds of barcodes? I’m still getting the odd error. 🤔

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [June 28, 2022, 4:20am UTC](https://community.thunkable.com/t/barcode-scanner-premature-activation/1938942/10 "2022-06-28T04:20:03Z")

</div>

What types of barcodes are you having the problem with? Can you post a few photos of those barcodes so we can try them?

---

<div class="post-metadata">

**Author:** ![tonyb2](https://avatars.discourse-cdn.com/v4/letter/t/c67d28/32.png) [@tonyb2](https://community.thunkable.com/u/tonyb2)\
**Post date:** [June 28, 2022, 4:43am UTC](https://community.thunkable.com/t/barcode-scanner-premature-activation/1938942/11 "2022-06-28T04:43:33Z")

</div>

Here’s one random one, and some screen shots of the scanner.  
It seems to work much better scanning the picture here as opposed to the real one. 🤔  
Try sweeping slowly across it from the left or the right.  
It seems to find different barcode types as well.  
The scans below are all of this same barcode.

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/4/c414f12c0831cd4ebc7b9eef61a6d516a9a6b242.png)

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/b/db61560615e4e12ef1303c154a0ef6b4bab35e9a.png)

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/c/dcd3489ee70721a6ca015d5bd08c61fe1c471f8d.png)

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/8/a87573e96cc621b4c1d0d7807045092c65b28974.png)

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [June 28, 2022, 8:17am UTC](https://community.thunkable.com/t/barcode-scanner-premature-activation/1938942/12 "2022-06-28T08:17:36Z")

</div>

I tried scanning that barcode slowly from left and right, in low light, from close up and farther away, and at various angles and it consistently (every time) shows this:

 ![IMG_5845](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/4/34d6833e7a3a3bc0e80561ec9cea00d93888daf4.jpeg)

---

<div class="post-metadata">

**Author:** ![tonyb2](https://avatars.discourse-cdn.com/v4/letter/t/c67d28/32.png) [@tonyb2](https://community.thunkable.com/u/tonyb2)\
**Post date:** [June 28, 2022, 8:58am UTC](https://community.thunkable.com/t/barcode-scanner-premature-activation/1938942/13 "2022-06-28T08:58:19Z")

</div>

I am puzzled… Thanks for trying.

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [June 28, 2022, 5:21pm UTC](https://community.thunkable.com/t/barcode-scanner-premature-activation/1938942/14 "2022-06-28T17:21:23Z")

</div>

It works fine with me. I tried 3 different barcodes in addition to the image you shared and all are OK.

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [June 28, 2022, 7:42pm UTC](https://community.thunkable.com/t/barcode-scanner-premature-activation/1938942/15 "2022-06-28T19:42:14Z")

</div>

What device are you using?

I was able to emulate this by trying hard, but it wasn’t happening easily.

---

<div class="post-metadata">

**Author:** ![tonyb2](https://avatars.discourse-cdn.com/v4/letter/t/c67d28/32.png) [@tonyb2](https://community.thunkable.com/u/tonyb2)\
**Post date:** [June 29, 2022, 7:03am UTC](https://community.thunkable.com/t/barcode-scanner-premature-activation/1938942/16 "2022-06-29T07:03:48Z")

</div>

Thanks. I’m using a Huawei P30 which has an excellent camera and a cheap Hisense E50.  
Both had glitches. I’m not sure what it is and we’ll have to live with it for now, and just make sure the operators stay on their toes…

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 1:13pm UTC](https://community.thunkable.com/t/barcode-scanner-premature-activation/1938942/17 "2024-11-08T13:13:08Z")

</div>


