ZXingOrient - a material BarcodeScanner

DonManfred

Expert
Licensed User
Longtime User
This is a wrap for this github-project.

It reads the following Barcode-Types:
"UPC_A",
"UPC_E",
"EAN_8",
"EAN_13",
"RSS_14",
"UPC_A",
"UPC_E",
"UPC_EAN_EXTENSION",
"EAN_8",
"EAN_13",
"CODABAR",
"CODE_39",
"CODE_93",
"CODE_128",
"ITF",
"RSS_14",
"RSS_EXPANDED",
"QR_CODE",
"DATA_MATRIX",
"PDF_417",
"AZTEC"

ZXingOrient
Author:
DonManfred (wrapper)
Version: 1.1
  • ZxingOrient
    Events:
    • onResult (code As Barcode)
    Methods:
    • Initialize (EventName As String)
    • IsInitialized As Boolean
    • addExtra (key As String, value As Object)
    • clearLastResultScan
    • clearSavedResult
    • initiateScan
    • initiateScan2 (cameraId As Int)
    • initiateScan3 (desiredBarcodeFormats As Collection)
    • initiateScan4 (desiredBarcodeFormats As Collection, cameraId As Int)
    • setBeep (setting As Boolean) As ZxingOrientWrapper
    • setIcon (iconID As Int) As ZxingOrientWrapper
    • setInfo (info As String) As ZxingOrientWrapper
    • setInfoBoxColor (color As Int) As ZxingOrientWrapper
    • setToolbarColor (color As Int) As ZxingOrientWrapper
    • setVibration (setting As Boolean) As ZxingOrientWrapper
    • showInfoBox (visibility As Boolean) As ZxingOrientWrapper
    Properties:
    • CaptureActivityResult As Intent [read only]
    • CaptureActivityResultScan As Bitmap [read only]
    • MoreExtras As Map [read only]

As the lib zip is >500kb you ca download the library (and the java sources too) here
https://www.dropbox.com/sh/hnbqcvqkacip0mu/AABzkKLbx1DlT9P3eLLC19rZa?dl=0
 

Attachments

  • Example.zip
    57.2 KB · Views: 719
Last edited:

Johan Schoeman

Expert
Licensed User
Longtime User
@DonManfred - this is a work of art! I love it! I have changed the code in your B4A example "Sub Button1_Click" to....
B4X:
Sub Button1_Click
 
    Dim mylist As List = Array As String("UPC_A", "UPC_E", "EAN_8", "EAN_13", "RSS_14", "UPC_A", "UPC_E", "UPC_EAN_EXTENSION", "EAN_8", "EAN_13", "CODABAR", "CODE_39", "CODE_93", "CODE_128", "ITF", "RSS_14", "RSS_EXPANDED", "QR_CODE", "DATA_MATRIX", "PDF_417", "AZTEC")
    scanner.setBeep(True).setInfo("DonManfred presents").setInfoBoxColor(Colors.Blue).setToolbarColor(Colors.Red).setVibration(True).showInfoBox(True).initiateScan3(mylist)
  
End Sub

...and it reads all of the barcodes listed in "mylist"

A Super Super nice lib! Thanks for posting it!
 
Last edited:

DonManfred

Expert
Licensed User
Longtime User

ivan.tellez

Active Member
Licensed User
Longtime User
Wow, great job!

There is a little problem, the resources lack the new resolution for larger screens so in latest phones, icons look bad.

Can you update the code to use icons at 24dp instead of 18dp?

Also, include the "drawable-xxxhdpi"

https://design.google.com/icons/#ic_center_focus_weak
https://design.google.com/icons/#ic_center_focus_strong
https://design.google.com/icons/#ic_flash_off
https://design.google.com/icons/#ic_flash_on

(if not, a work around for users, is downloading 24dp and renaming all the files to 18dp.)
 

DonManfred

Expert
Licensed User
Longtime User
- Update to b4a 6+. Android has changed the big google pay services jar into smaller pieces inside the maven repository. Take care of the notes regarding b4a 6 in the release thread.
- Update Appcompat and DesignSupport libraries to newest versions. Take care of the notes regarding b4a 6 inside the supportthreads of these libs.
 

Leni Berry

Active Member
Licensed User
Longtime User
cannot read this barcode... i dont know what type it is...
 

Attachments

  • sample barcode.png
    sample barcode.png
    55.7 KB · Views: 316

Johan Schoeman

Expert
Licensed User
Longtime User
cannot read this barcode... i dont know what type it is...
I have tried scanning it with a number of different barcode scanners and none of them can identify it. Might be some sort of "non-standard" barcode I guess
 

DonManfred

Expert
Licensed User
Longtime User
Is it possible use a built in laser scanner (not the camera)?
Not with this lib. The lib depends on the Camera.

For your Built-In Scanner you probably need to use the API from this scanner to use it. Maybe there is an SDK available for this device. You need to write a wrapper for this SDK to use it in B4A.
 

prajinpraveen

Active Member
Licensed User
Longtime User
1. event, onResult does not fire.
2. Type Barcode is not available.

Please help.

Events:
  • onResult (code As Barcode)
 

rkmoray

Active Member
Licensed User
Longtime User
I went to download this library and have a look at it,but it is no longer available (404 error)
 
Top