Aspose.BarCode  for Android via Java

Android APIs for Barcode Generation & Recognition

Create or read 1D, 2D and postal barcodes from images in any Android mobile app.

  Download Free Trial
  
 

Aspose.BarCode for Android via Java is a barcode generation & reading API for Android applications. Its supports scanning 1D, 2D, and postal barcodes from images at different angles. The barcode generator API can easily create barcode images and save them in various formats. It also provides rich imaging functionality, such as customizing barcode borders, color, rotation angle, resolution, and much more.

Advanced Android Barcode API Features

Create Custom Barcodes

The barcode library for Android via Java allows developers to customize some common barcode parameters, including the type of barcode, the data to be encoded, the barcode size, the font style and color, and the orientation angle. To generate a barcode, you need to select the required type of barcode to create, such as, for example, UPC or EAN. You also have to enter the data to be stored in the barcode, such as a product number or a URL. In addition, you can set the required sizing mode and adjust the color of barcode elements, resolution, border style, and other appearance-related parameters. It is possible to modify the width of the bars and spacing between them. These additional parameters can affect the readability and quality of barcodes, so it is important to understand their purpose and how to adjust them correctly.

Barcode Generation Live Example

The barcode generator API can create barcodes by specifying the required type, setting input text (data to be encoded in a barcode), and customizing appearance-related properties, such as background and foreground color, font, and text captions. Two-dimensional barcodes, such as PDF417, Data Matrix, Aztec Code, QR Code, and Micro QR Code can be generated in the same way as 1D types.

Code to be executed - Java


// Create an instane of the BarcodeGenerator class
BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.QR);

// Specify the code text
generator.setCodeText("");

// Specify the X-dimension 
// the smallest width of the unit of BarCode bars or spaces
generator.getParameters().getBarcode().getXDimension().setMillimeters(2);

// Set codetext position
generator.getParameters().getBarcode().getCodeTextParameters().setLocation(CodeLocation.Below);

// Generate image
generator.generateBarCodeImage();
Generation result

Barcode Scanner and Decoder

The barcode API enables detecting and reading barcodes of over 60 popular 1D and 2D types. It only requires a few lines of code to scan barcodes, making it easy to integrate this functionality into your applications. This powerful feature allows you to scan and read barcodes from a wide range of sources, such as images, documents, etc. It can be used to automate processes, reduce the risk of errors, and improve the overall efficiency of operations. Whether you need to develop applications for retail, logistics, healthcare, or any other field, this barcode API can provide a solution for barcode detection and reading tasks.

Barcode Recognition Live Example

The barcode reader API provides a set of features for scanning, detecting, and reading 1D, 2D, and postal barcodes. With just a few lines of code, developers can easily integrate this functionality into their applications and use it to detect and decode a wide range of commonly used barcodes. The API is designed to be user-friendly and intuitive, making it easy for developers to quickly and easily add barcode scanning capabilities to their applications.

Ready to recognize Recognizing Drop a file here or click to browse *

* By uploading your files or using the service you agree with our Terms of use and Privacy Policy.

Code to be executed - Java

    
// initialize reader with image & expected type
BarCodeReader reader = new BarCodeReader(var reader = new Aspose.BarCode.BarCodeReader("<file name>", DecodeType.AllSupportedTypes);

// read code
while (reader.read()) {
    // print the code type & text
    System.out.println("Type: " + reader.getCodeType() + " Text: " + reader.getCodeText());
}

Recognition result

What People Are Saying

Don't just take our word for it. See what users have to say about APIs.

 
 
View Case Studies
  

Support and Learning Resources