Android Code 128 Generator generate, create barcode Code 128 images in Android application
Code 128 Generator for Android to Generate Code-128 Barcodes in Android Application using Android Barcode Generator Library
- Easy to use Android Code 128 generation api
- Developed from Java Code 128 barcode generator
- Compatible with Android 1.5 SDK and later versions
- Easy to add the Code 128 SDK into Android apps
- Generate high quality Code 128 barcode with the Android Code 128 SDK
- GIF, JPEG, and PNG are supported by the Android Code 128 Barcode Generator
- Reliable and mature Android barcode library for Code 128 generation
- Compatible with the latest Code 128 barcode symbology standard
- Android Code 128 source code is available for the purchase of the Source Code license
Index
Android Code 128 Barcode Generator Introduction
Android Code 128 barcode API is a Code 128 generator for Android apps, designed for creating Code 128 barcode on Android platform.
- Android Code 128 SDK is entirely developed for Android platform
- Android Code 128 generator is completely built in Android 1.5 SDK
- Developer Licenses for this Android Code 128 library are royalty-free and perpetual
dot net barcode library,
barcode recognition vb.net,
how to create barcode scanner application in c#,
install code 128 fonts toolbar in excel,
c# upc barcode generator,
qr code generator in c# windows application
Code-128 is a very high-density barcode symbology. (A special version of it called GS1-128 is used extensively world wide in shipping and packaging industries.) It is used for alphanumeric or numeric-only barcodes.
OnBarcode provides several Code 128 Generator libraries, SDK and software, including
Code 128 in C#,
Code 128 in .NET,
Code 128 in Java,
Code 128 in ASP.NET,
Code 128 in VB.NET,
Code 128 Generator.
Code 128 Valid Data Scope
Android Barcode Code 128 supports:
- all 128 characters of ASCII
- values 128-255 in accordance with ISO 8859-1. There are referred to as extended ASCII.
How to generate Code 128 barcodes in your Android application?
Generating barcode Code 128 in Java Class example
Code128 barcode = new Code128();
/*
Code 128 Valid data char set:
all 128 ASCII characters (Char from 0 to 127)
*/
barcode.setData("112233445566");
// Set the processTilde property to true, if you want use the tilde character "~"
// to specify special characters in the input data. Default is false.
// 1) All 128 ISO/IEC 646 characters, i.e. characters 0 to 127 inclusive, in accordance with ISO/IEC 646.
// NOTE This version consists of the G0 set of ISO/IEC 646 and the C0 set of ISO/IEC 6429 with values 28 - 31
// modified to FS, GS, RS and US respectively.
// 2) Characters with byte values 128 to 255 may also be encoded.
// 3) 4 non-data function characters.
// 4) 4 code set selection characters.
// 5) 3 Start characters.
// 6) 1 Stop character.
barcode.setProcessTilde(false);
// Unit of Measure, pixel, cm, or inch
barcode.setUom(IBarcode.UOM_PIXEL);
// barcode bar module width (X) in pixel
barcode.setX(1f);
// barcode bar module height (Y) in pixel
barcode.setY(75f);
// barcode image margins
barcode.setLeftMargin(10f);
barcode.setRightMargin(10f);
barcode.setTopMargin(10f);
barcode.setBottomMargin(10f);
// barcode image resolution in dpi
barcode.setResolution(72);
// disply barcode encoding data below the barcode
barcode.setShowText(true);
// barcode encoding data font style
barcode.setTextFont(new AndroidFont("Arial", Typeface.NORMAL, 12));
// space between barcode and barcode encoding data
barcode.setTextMargin(6);
barcode.setTextColor(AndroidColor.black);
// barcode bar color and background color in Android device
barcode.setForeColor(AndroidColor.black);
barcode.setBackColor(AndroidColor.white);
/*
specify your barcode drawing area
*/
RectF bounds = new RectF(30, 30, 0, 0);
barcode.drawBarcode(canvas, bounds);
Android Code 128 Barcode Properties
Barcode Java Class:
com.onbarcode.barcode.android.Code128.
Category |
Properties |
Value |
Comments |
Basic
|
Property: data
|
Type: String
Default: ""
|
Code 128 barcode data to encode
Code 128 Valid Data Char Set:
- all 128 ASCII characters (Char from 0 to 127)
|
Property: addCheckSum
|
Type: boolean
Default: false
|
addCheckSum property is not applied for Code 128. |
|
Code 128 Special |
Property: codeSet
|
Type: int
Default: 0 (SET_AUTO)
|
4 valid code sets: 0 (SET_AUTO), 1 (SET_A), 2 (SET_B), 3 (SET_C)
|
Property: processTilde
|
Type: boolean
Default: false
|
Set the processTilde property to true, if you want use the tilde character "~"
to specify special characters in the input data, such as non-printable chars in ASCII table.
- 1-byte character: ~0dd/~1dd/~2dd (character value from 000 ~ 255); ASCII character '~' is presented by ~126
Strings from "~256" to "~299" are unused
- 2-byte character (Unicode): ~6ddddd (character value from 00000 ~ 65535)
Strings from "~665536" to "~699999" are unused
|
|
Barcode Size Related |
Property: autoResize
|
Type: boolean
Default: false
|
Auto resize the generated barcode image
|
Property: barAlignment
|
Type: int
Default: 1 (center)
|
Barcode horizontal alignment inside the image. 0: left, 1: center, 2: right. |
Property: uom
|
Type: int
Default: 0 (pixel)
|
Unit of meature for all size related settings in the library.
Valid values: 0: pixel; 1: inch; 2: cm.
|
Property: X
|
Type: float
Default: 1
|
Width of barcode bar module (narrow bar), default is 1 pixel |
Property: Y
|
Type: float
Default: 30
|
Height of barcode bar module, default is 30 pixel |
Property: barcodeWidth
|
Type: float
Default: 0
|
Barcode image width.
If barcodeWidth setting is smaller than the barcode required minimum width, the library will automatically reset to barcode minimum width. |
Property: barcodeHeight
|
Type: float
Default: 0
|
Barcode image height.
If barcodeHeight setting is smaller than the barcode required minimum height, the library will automatically reset to barcode minimum height. |
Property: leftMargin
|
Type: float
Default: 0
|
Barcode image left margin size. |
Property: rightMargin
|
Type: float
Default: 0
|
Barcode image right margin size. |
Property: topMargin
|
Type: float
Default: 0
|
Barcode image top margin size. |
Property: bottomMargin
|
Type: float
Default: 0
|
Barcode image bottom margin size. |
Property: resolution
|
Type: int
Default: 72
|
Barcode image resolution in DPI (Dots per inch). |
Property: rotate
|
Type: int
Default: 0 (IBarcode.ROTATE_0)
|
Valid values:
- 0 (IBarcode.ROTATE_0)
- 1 (IBarcode.ROTATE_90)
- 2 (IBarcode.ROTATE_180)
- 3 (IBarcode.ROTATE_270)
|
|
Barcode Colors |
Property: backColor
|
Type: AndroidColor
Default: AndroidColor.white
|
Barcode image background color |
Property: foreColor
|
Type: AndroidColor
Default: AndroidColor.black
|
Barcode image foreground color
|
|
Font Style |
Property: showText
|
Type: boolean
Default: true
|
If true, display barcode data text under the barcode, otherwise do not display. |
Property: textFont
|
Type: AndroidFont
Default: new AndroidFont("Arial", Typeface.NORMAL, 11)
|
Barcode text font style.
|
Property: textMargin
|
Type: float
Default: 6
|
Space between barcode and barcode data text, default is 6 pixel |
Property: textColor
|
Type: AndroidColor
Default: AndroidColor.black
|
Barcode text color
|
All Android Barcode Generator Supporting Bar Code Symbology Types