Android QR code generation for numbers
com.google.zxing.Writer writer = new UPCAWriter();
String finaldata = Uri.encode(data, characterEncoding);
BitMatrix bm = writer.encode(finaldata, mBarcodeFormat, bitmapWidth,bitmapHeight);
ImageBitmap = Bitmap.createBitmap(bitmapWidth, bitmapHeight,Config.ARGB_8888);
for (int i = 0; i < bitmapWidth; i++) {
for (int j = 0; j < bitmapHeight; j++) {
ImageBitmap.setPixel(i, j, bm.get(i, j) ? Color.BLACK: Color.WHITE);
}
}
Try this
for Numbers use this
UPCA has limit of 12 numbers