I need to create a qrcode in my android application, and I need a library or source code that lets me create a QR Code in an Android app.
The library I need must:
onbarcode
library)I already created such code for iPhone (Objective-C) but I need a quick fix for Android until I have time to make a QR Code generator of my own. It's my first android project so any help will be appreciated.
with zxing this is my code for create QR
QRCodeWriter writer = new QRCodeWriter();
try {
BitMatrix bitMatrix = writer.encode(content, BarcodeFormat.QR_CODE, 512, 512);
int width = bitMatrix.getWidth();
int height = bitMatrix.getHeight();
Bitmap bmp = Bitmap.createBitmap(width, height, Bitmap.Config.RGB_565);
for (int x = 0; x < width; x++) {
for (int y = 0; y < height; y++) {
bmp.setPixel(x, y, bitMatrix.get(x, y) ? Color.BLACK : Color.WHITE);
}
}
((ImageView) findViewById(R.id.img_result_qr)).setImageBitmap(bmp);
} catch (WriterException e) {
e.printStackTrace();
}