B4A Library Barcode Generator

This library will allow you to generate barcodes and place them on an ImageView or download them as a file.


Requirements:

1- Internet connection

2- Copy the BarcodeGenerator.jar and BarcodeGenerator.xml to your additional libraries directory.


Usage:
Code: Copy
'Initialize the library
Dim bc As BarcodeGenerator

bc.Initialize

'If you just want to display the barcode do this:
bc.GenerateBarcode(ImageView1, "qrcode" , "1234567890", "", "")

'If you want to save the barcode as a picture then do this:
bc.SaveBarcode(File.DirDefaultExternal, "MyBarcode.png", "qrcode", "12345", "", "", False)

That's it.

This library supports the following formats:
QRCODE, DATAMATRIX, PDF417, POSTNET, UPC-A, UPC-E, EAN-8, EAN-13, CODE39, CODE93, CODE128, CODABAR and ISBN
 

Attachments

you are a great
This is exactly what I was looking for!

Thank you so much :)
 
might come in handy indeed.

just wondering...

why does it need an internet connection?

the library just posts to an online barcode image generator and shows the returned image?
 
Hoi NJDude,

Thx for that lib, works fine.
When playing around with the last 2 parameters (Back- & ForeColour) i noticed hat not all colours take effect ?
Like this
Code: Copy
bc.GenerateBarcode(BarcodeView, "qrcode" , "1234567890", Colors.Blue , Colors.Yellow )
it shows the code green on light blue.

Or are the colours "mixed" like complimentary colours ? ;)
 
Hoi NJDude,

Thx for that lib, works fine.
When playing around with the last 2 parameters (Back- & ForeColour) i noticed hat not all colours take effect ?
Like this
Code: Copy
bc.GenerateBarcode(BarcodeView, "qrcode" , "1234567890", Colors.Blue , Colors.Yellow )
it shows the code green on light blue.

Or are the colours "mixed" like complimentary colours ? ;)

You have to enter the colors like this: B4AB4A or FCAB12
 
Thx for your reply - works fine now :)
 
Using NJDude masterful new library, I was trying to generate multiple barcodes from a SQLite table column by iterating through all data in that field. However, it only creates a barcode for the last record in the table. Please see my attached project for complete code.
 

Attachments

Always good practice to share which external API you use, this because of rate limits and warranty issues when deployed in an app.
 
I made another attached complete project where I create barcode files in a batch mode that does the following:
1. Cycle through all SQLite table records and create a batch of barcode files whose names are the selected column data.
2. Optionally zip all the files into one zip file to reduce memory usage.
3. Optionally delete all barcode png files and only leave the zipped file to free disk space.
It works for a small table, but I am not sure it is suitable for a large table because of the intensive file creation. In the event USADude (formerly NJDude) has time to rebuild his library, his method will certainly be superior.
 

Attachments

Can I get indication if failed or success to create barcode
and if failed not present it (currently if failed, I get error on screen)
 
Best seems BARCOO, the ZING Scanner (for me) is not as good as the other one.
 
Hi All,
Is there a possibility to use this for B4J.

Please help need Datamatrix for a project.
 
Back
Top