problem of scanning a barcode in China

Discussions about creating CAPI applications to run on Android devices
Forum rules
New release: CSPro 8.0
jinnee6603
Posts: 9
Joined: May 26th, 2021, 5:21 am

problem of scanning a barcode in China

Post by jinnee6603 »

Hi,

I find it is not possible to scan a barcode on all the tablets I tried in China. It started camera, but cannot start scanning. I tried with the same program on 2 other tablets outside China, then it works.

I count not figure out why, if it is not a problem with the program, then should be something with permissions? I have allowed all the permissions for CSPro.

I attached a testing file here.

best

jing
Attachments
test76.rar
(390.63 KiB) Downloaded 152 times
aaronw
Posts: 561
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: problem of scanning a barcode in China

Post by aaronw »

I transferred your application to my Pixel and scanned a barcode without issue. At least we can eliminate that as a possibility.

You've tried on multiple tablets. Are they all the same? Or different make/models? Also, have you try multiple barcodes?
jinnee6603
Posts: 9
Joined: May 26th, 2021, 5:21 am

Re: problem of scanning a barcode in China

Post by jinnee6603 »

Hi Aaronw,

I have tried on more than 5 mobiles/tablets in China, with different brands (Huawei, Samsung), with different android versions, and also tried different barcodes, QR codes. They all failed in China.

I tried with one mobile in Oslo and three tablets in Niger, they worked.

So this is strange. CSentry starts camera, but cannot start scanning.

best

jing
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: problem of scanning a barcode in China

Post by Gregory Martin »

You might see if there's an issue with the devices recognizing the QR code that we are presenting, or if it is a barcode issue in general. Run some code like:
errmsg("barcode = %s", barcode.read());
And scan a barcode on a book, water bottle, or something that you have handy. Can the devices read these barcodes?
jinnee6603
Posts: 9
Joined: May 26th, 2021, 5:21 am

Re: problem of scanning a barcode in China

Post by jinnee6603 »

Hi,

It is not a issue with the devices recognizing barcodes, they can do it from camera, or through other apps. And it is not something wrong with barcodes either, I have tried with different barcodes.

I tried the same program in China, in Oslo and in Niger. They works fine outside China, but cannot start scanning (after start camera) in China.

I tried the code, it report "barcode = ".

best
jing
aaronw
Posts: 561
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: problem of scanning a barcode in China

Post by aaronw »

Strange, can you attach a barcode that is giving you issue (no private data) and let me try scanning it?
jinnee6603
Posts: 9
Joined: May 26th, 2021, 5:21 am

Re: problem of scanning a barcode in China

Post by jinnee6603 »

Hi,

I have tried more than 30 barcodes/QR codes from different sources, they all failed. I attached an example here.

best

Jing
Attachments
Capture.PNG
Capture.PNG (86.32 KiB) Viewed 3584 times
aaronw
Posts: 561
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: problem of scanning a barcode in China

Post by aaronw »

I can use your application to read both. As you said this isn't an issue with the application or the barcode. There's an issue in the middle and I will have to do a bit of research.
jinnee6603
Posts: 9
Joined: May 26th, 2021, 5:21 am

Re: problem of scanning a barcode in China

Post by jinnee6603 »

Hi Aaronw,

The strange thing is that they all worked when I tried with tablets/mobiles in Oslo and Niger, but not with any tablet/mobile in China. I could not bring my mobile outside China to test it at the moment, due to the COVID 19 situation. I would think it is related to some kind of permission thing, but I have allowed all permissions for CSEntry. And I would not think it is related to mobiles/tablets sold in China, because I tried with tablets/mobiles bought abroad. But they don't work either in China.

best

Jing
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: problem of scanning a barcode in China

Post by Gregory Martin »

Do your tablets have Google Play services on them? A lot of low cost tablets don't because then they don't have to abide by Google standards. The barcode reading code uses libraries that are part of Google Play services, so not having them would lead to to a failure to process the image into a text barcode.
Post Reply