This is my first attempt at B4J. Have not tried to do anything special to the layout etc. The aim was to get back the correct binary strings to draw Code11, Code39, Code93, EAN8 and EAN13 barcodes with. All the code are in the main module as well as modules for each of the types of barcodes. The B4J project also includes a class called StringUtilities that the project makes use of. This class contains 38 string manipulation methods making use of inline java code.
Each of the barcode modules return a binary string (1's and 0's). You need to draw an equal sized bar (width and height) for each 1 (black) and for each 0 (white). For eg, 11 will be two black bars next to one another, 10 will be a black bar followed by a white bar, 00 will be two consecutive white bars, and 01 will be a white bar followed by a black bar.
The barcodes generated for EAN8 and EAN13 includes the parity bits - take note that the label next to them only shows the original input message for EAN8 and EAN13 barcodes. You can amend the code in the B4J project to your own liking and for eg return an array of strings that contains for eg (1) the binary string of the input message and (2) the parity bit/number for EAN8 or EAN13 barcodes. Very simple to do and I leave it up to whoever wants to use this project.
Have not fully amended the error checking for valid input messages. Simple to do and I leave it up to whoever wants to use this B4J project.
This project is based on my B4A project that you can find here. Just busy amending it so that it can be used in B4J. Have tested/scanned each of Code11, Code39, Code93, EAN8 and EAN13 with QRCPV4 that you can find here.
I will add Code128, Aztec Codes, PDF417, and QR Codes (as what I have inside the B4A project) as and when time permits.
No internet connection is required to generate the barcodes - all the code are in the code modules.
Edit: see project in post #9. It generates QRCodes, PDF417, Aztec Codes, Code11, Code39, Code93, EAN8, EAN13, and Code128
Each of the barcode modules return a binary string (1's and 0's). You need to draw an equal sized bar (width and height) for each 1 (black) and for each 0 (white). For eg, 11 will be two black bars next to one another, 10 will be a black bar followed by a white bar, 00 will be two consecutive white bars, and 01 will be a white bar followed by a black bar.
The barcodes generated for EAN8 and EAN13 includes the parity bits - take note that the label next to them only shows the original input message for EAN8 and EAN13 barcodes. You can amend the code in the B4J project to your own liking and for eg return an array of strings that contains for eg (1) the binary string of the input message and (2) the parity bit/number for EAN8 or EAN13 barcodes. Very simple to do and I leave it up to whoever wants to use this project.
Have not fully amended the error checking for valid input messages. Simple to do and I leave it up to whoever wants to use this B4J project.
This project is based on my B4A project that you can find here. Just busy amending it so that it can be used in B4J. Have tested/scanned each of Code11, Code39, Code93, EAN8 and EAN13 with QRCPV4 that you can find here.
I will add Code128, Aztec Codes, PDF417, and QR Codes (as what I have inside the B4A project) as and when time permits.
No internet connection is required to generate the barcodes - all the code are in the code modules.
Edit: see project in post #9. It generates QRCodes, PDF417, Aztec Codes, Code11, Code39, Code93, EAN8, EAN13, and Code128
Attachments
Last edited: