B4A Library android-quick-response-code - another 1D & 2D barcode scanner

It is an absolute bare minimum wrap for this Github project - just enough to start the scanner. I leave the rest up to whoever wants to add (a lot of) functionality to it such as:
1. Change the laser color
2. Change the text color
3. Change the background color
4. Pass the scanned result back to B4A - you need to do it in public void ResultArrived(int arg0, Intent data) { of the wrapper (aQrcWrapper.java) but will have to create the intent in CaptureActivity.java
5. etc, etc, etc

Above reasonably easy to do - so I leave it to those that wants to complete the wrapper.

Posting the following:
1.The B4A project
2. The B4A library files - copy them to your additional library folder
3. a zipped file containing core-3.2.2-20150819.125554-1.jar - copy it to your additional library folder
4. The Java Code (src folder). You need to create a folder called libs on the same folder level as the src folder and copy core-3.2.2-20150819.125554-1.jar into this folder in order to compile the Java code with SLC or with Eclipse.

1.png



2.png


A nice challenge - enjoy!
 

Attachments

  • AndroidQuickResponseCodeLibFiles.zip
    101.9 KB · Views: 249
  • b4aAndroidQuickResponseCode.zip
    135.8 KB · Views: 240
  • core-3.2.2-20150819.125554-1.zip
    484 KB · Views: 239
  • TheJavaCode.zip
    109.1 KB · Views: 210

Johan Schoeman

Expert
Licensed User
Longtime User
Its possible to add a torch method from b4a and using java code?

(the people works in the night reading barcodes and the torch is very useful)
I don't think it will be possible. The library takes charge of the camera and unless the camera is released by the library you will not be able to do anything to get the torch and the scanner to work simultaneously from two different libraries or even making use of inline Java code. The code to make torch and scanner work together needs to be added to this projects library.

I will see if I can add it...
 

Johan Schoeman

Expert
Licensed User
Longtime User

dfrutos

Member
Licensed User
Longtime User
I have problems with some barcodes with the Zxing lib. I tried with quick response code barcode and have not problems. For this reason i like this lib. Just torch method is necesary because without light is very difficult to read barcodes.
 

Attachments

  • bad_reader_barcode.JPG
    bad_reader_barcode.JPG
    16.8 KB · Views: 96

Johan Schoeman

Expert
Licensed User
Longtime User
I have problems with some barcodes with the Zxing lib. I tried with quick response code barcode and have not problems. For this reason i like this lib. Just torch method is necesary because without light is very difficult to read barcodes.
I have looked at the original Github code and this is not a minor change. A lot of code than needs to change/added/amended. Will look into it when I have some time available.
 

Johan Schoeman

Expert
Licensed User
Longtime User
I have problems with some barcodes with the Zxing lib. I tried with quick response code barcode and have not problems. For this reason i like this lib. Just torch method is necesary because without light is very difficult to read barcodes.
Have you tried this one
https://www.b4x.com/android/forum/t...zxing-project-as-it-is-on-10-july-2016.68829/

You should be able to switch on/off the torch with the volume up/down buttons of your device. Much easier to add events to the project in the above link than to add code to the project in this thread
 

Johan Schoeman

Expert
Licensed User
Longtime User
I have problems with some barcodes with the Zxing lib. I tried with quick response code barcode and have not problems. For this reason i like this lib. Just torch method is necesary because without light is very difficult to read barcodes.
i can read your UPC_A barcode without a problem....
 

Johan Schoeman

Expert
Licensed User
Longtime User
I have problems with some barcodes with the Zxing lib. I tried with quick response code barcode and have not problems. For this reason i like this lib. Just torch method is necesary because without light is very difficult to read barcodes.
The project here
https://www.b4x.com/android/forum/t...scan-qr-codes-and-other-1d-2d-barcodes.49084/
scans you code posted above without any problem whatsoever. And by using the volume up/down buttons of your device you can switch the torch on/off

1.png
 
Top