1. First of all now zxing Lib
2. Integrated zxing in Android studio.
public void Scan (view view) { Startactivityforresult (new Intent (Mainactivity.this, Captureactivity.class), 0); }
The above is an open sweep. Two-dimensional code generation can go to http://cli.im/
3. Create two-dimensional code
public void make (view view) { String input = Minput.gettext (). toString (); if (Input.equals (")") { toast.maketext (mainactivity.this, "Input cannot be empty", Toast.length_long). Show (); else { Bitmap Bitmap = Encodingutils.createqrcode (input, 500,500, Bitmapfactory.decoderesource ( Getresources (), R.drawable.icon)); Mivresult.setimagebitmap (bitmap); } }
Effects such as. Where scan corresponds to the scan method. The result after the scan is: Hello!
Make QRCode to create code for the QR code, by making. Creates a two-dimensional code for the result.
Android sweep----Use of ZXing