Android Question ABZXING Not Working After I create APK What Am I Doing Wrong?

John Ruggles

Member
Licensed User
Longtime User
I can use the ABZXING routines Written by Alain Bailleul (Thanks) and everything works ok while I am in debug mode. Once I create an APK and install that, the scanner just keeps trying to scan the barcode and never hits the part of my code for the _BarcodeFound condition. Do you have any ideas on what I may be doing wrong? I don't have a signed APK at this point. Everything installs properly but just hangs trying to scan the bar code. Any help/ideas would be appreciated. Thanks!
 

John Ruggles

Member
Licensed User
Longtime User
Are you compiling in Obfuscated mode?

Erel, Thanks for the reply. I am not compiling using Obfuscated mode. I click I set the compile type (in the drop down) to Release.
I tried to click Project, Compile To Library but I get an error "No Modules to compile", so, I figured I was doing something wrong there so I click Project, compile & run. When the app runs, it will not recognize scanning any bar code. Same as if I copy the .apk over, uninstall and re-install, reboot the tablet (Nexus 10). I am sure it's something I am doing wrong but I can't seem to figure out why it won't scan this way. I have searched your forum but found no one else reporting this same issue.

The app I am currently testing with now is only a few lines: dim jBC as ABZxing, jBC.ABGetBarCode("jBC, QR_Code_Types") and to catch when the barcode is read, jBC_Barcodefound(barCode as String, formatName as String).

Works in debug mode but not when I compile & run.

Thank You! John
 
Upvote 0

John Ruggles

Member
Licensed User
Longtime User
Maybe this library requires a permission that is added automatically in debug mode.
Run your program in debug mode and press on the "Show Permissions" button (in the compilation window).

I also notice that when I do a normal barcode scan, yellow dots appear trying to locate that barcode but not when I install via apk and run.
Here are the permissions needed:
The following objects added permissions (duplicates are ignored):
DEBUGGER:
android.permission.INTERNET
android.permission.BLUETOOTH
android.permission.WRITE_EXTERNAL_STORAGE
android.permission.BLUETOOTH_ADMIN
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
ABZXING needs an compatible barcode-scanning-app. For example QuickMark
With this app as "Barcodereader" the libs works great for me in my app(s).
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
jBC.ABGetBarCode("jBC, QR_Code_Types")

Are you sure the Command is correct?

B4X:
jBC.ABGetBarCode("jBC, QR_Code_Types")

i think this is not correct syntax.

It should be
B4X:
jBC.ABGetBarCode("jBC", "QR_Code_Types")

or, even better to try first

B4X:
jBC.ABGetBarCode("jBC", "") ' "" for type to use ALL Types...
 
Upvote 0

John Ruggles

Member
Licensed User
Longtime User
ABZXING needs an compatible barcode-scanning-app. For example QuickMark
With this app as "Barcodereader" the libs works great for me in my app(s).

ABZxing needs Barcode Scanner bZXing Team installed, which it is. I'll try the one you suggested to see if I have any more luck and thanks for the tip !!
 
Upvote 0

John Ruggles

Member
Licensed User
Longtime User
Are you sure the Command is correct?

B4X:
jBC.ABGetBarCode("jBC, QR_Code_Types")

i think this is not correct syntax.

It should be
B4X:
jBC.ABGetBarCode("jBC", "QR_Code_Types")

or, even better to try first

B4X:
jBC.ABGetBarCode("jBC", "") ' "" for type to use ALL Types...

Thanks. That was me typing in the code manually instead of copying and pasting and thanks. I have tried both ways and works fine In debug mode but not via an apk install standalone.
 
Upvote 0
Top