Android Question Barcode scanner

Sberla

Active Member
Licensed User
Longtime User
I'm using this library with android 9 and sdk 28

https://www.b4x.com/android/forum/threads/oh-no-another-barcode-scanner-100-embedded-in-b4a.83082/

but it gives me this error:

B4A Version: 9.30
Java Version: 8
Code Analysis. (0.00s)
Building folders structure. (0.12s)
Code compilation. (0.02s)
Compiling the layout code (0.02s)
Bookstore Organization. (0.00s)
(AndroidX SDK)
Generating R. files (2.97s)
Compiling the debugger code. (0.83s)
Compiling the produced Java code. (5.37s)
Byte code conversion - dex optimization. error
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcodescannerwrapper / codescannerWrapper;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcodescannerwrapper / codescannerWrapper $ 1;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcodescannerwrapper / codescannerWrapper $ 1 $ 1;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom / budiyev / android / codescanner / CodeScanner;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom / budiyev / android / codescanner / CodeScanner $ 1;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom / budiyev / android / codescanner / CodeScanner $ AutoFocusCallback;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom / budiyev / android / codescanner / CodeScanner $ AutoFocusTask;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom / budiyev / android / codescanner / CodeScanner $ DecoderStateListener;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom / budiyev / android / codescanner / CodeScanner $ FinishInitializationTask;
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: Translation has been interrupted
at com.android.dx.command.dexer.Main.processAllFiles (Main.java:696)
at com.android.dx.command.dexer.Main.runMonoDex (Main.java:315)
at com.android.dx.command.dexer.Main.runDx (Main.java:293)
at com.android.dx.command.dexer.Main.main (Main.java:249)
at com.android.dx.command.Main.main (Main.java:94)
Caused by: java.lang.InterruptedException: Too many errors
at com.android.dx.command.dexer.Main.processAllFiles (Main.java:688)
... 4 more

What can I do?
 

Sberla

Active Member
Licensed User
Longtime User
I managed to make it work but it doesn't read barcodes, maybe it just reads qr codes
 
Upvote 0

josejad

Expert
Licensed User
Longtime User
Have tested it with:
Aztex codes
QR codes
PDF417
EAN13
DataMatrix

EAN13 is a kind of barcode, test the barcode type you're trying to read is one of the specified. Try different bar codes to read.

The gitHub project says:
Supported formats
1D product 1D industrial 2D
UPC-A Code 39 QR Code
UPC-E Code 93 Data Matrix
EAN-8 Code 128 Aztec
EAN-13 Codabar PDF 417
ITF MaxiCode
RSS-14
RSS-Expanded
 
Upvote 0

Sberla

Active Member
Licensed User
Longtime User
EAN13 is a kind of barcode, test the barcode type you're trying to read is one of the specified. Try different bar codes to read.

The gitHub project says:
Supported formats
1D product 1D industrial 2D
UPC-A Code 39 QR Code
UPC-E Code 93 Data Matrix
EAN-8 Code 128 Aztec
EAN-13 Codabar PDF 417
ITF MaxiCode
RSS-14
RSS-Expanded

Yes I found how to make it work. The problem is that it does not focus properly and does not always read the bar code
 
Upvote 0
Top