zxing

Android Using ZXing Generate QR Code

爷,独闯天下 提交于 2019-11-30 06:03:24
I was having some problem when trying to generate QR code in Android Programming. Here is the Tutorial I followed. When my generate button on click, I am calling this method: private void generateQR(){ String qrInputText = "test"; //Find screen size WindowManager manager = (WindowManager) getSystemService(WINDOW_SERVICE); Display display = manager.getDefaultDisplay(); Point point = new Point(); display.getSize(point); int width = point.x; int height = point.y; int smallerDimension = width < height ? width : height; smallerDimension = smallerDimension * 3/4; //Encode with a QR Code image

How to add a logo to QR code in android

六月ゝ 毕业季﹏ 提交于 2019-11-30 05:29:55
I have seen few QR codes with company logo at the center. Is it possible to generate a QR code with a any logo in android? If possible kindly explain the way for doing it. Currently I am using Zxing for generating QR codes. A QR code is a quick response code, You can use zxing to make the QR codes. but by default there are no company logos present there at center or any other part. What you can do is create a QR code and on top of it draw the logo image of the company With reference to the guide and source code provided at Generating a qr code with a logo please find the sample Android code

How to read multiple qr codes from one image using zxing library

瘦欲@ 提交于 2019-11-30 05:04:54
I am currently developing a scanner that reads multiple QR codes found in one image. I manage to read the QR codes in the image but it's giving me inconsistent results. Assuming there are 4 QR codes in the image, sometimes I can read 2 and sometimes 3 or just 1. Unlike in the original scanner (ZXing Scanner) it decodes fast. While in my case, I have to make sure there is enough light and the image is not blurred to decode it. I am using the QRCodeMultiReader to decode the image. Currently using ZXing Library to create the application. Below is the snippet of my code: public void onPictureTaken

A QR scanner inside of a Fragment

笑着哭i 提交于 2019-11-30 01:37:26
问题 I'm using ViewPager for swiping between my Fragments. Is it possible to integrate a QR scanner (zxing or any other) inside of a Fragment so that I can swipe from scanners View to another Fragment and vice versa? As far as I can tell, the majority of qr scanners require me to use an extended Activity class and to start it for result, handling it in onActivityResult, which is not an option to me 回答1: The barcodefragmentlib is the one you are looking for. And its wiki shows you how to integrate

getting scan result when using zxing?

纵饮孤独 提交于 2019-11-29 23:31:16
问题 I am currently using the Zxing library in my app. After scanning the bar code of a book for example, how do I get things like the image, description, etc. from the scan result. @Override public void onActivityResult(int requestCode, int resultCode, Intent intent) { switch(requestCode) { case IntentIntegrator.REQUEST_CODE: if (resultCode == RESULT_OK) { IntentResult scanResult = IntentIntegrator.parseActivityResult(requestCode, resultCode, intent); } else if (resultCode == RESULT_CANCELED) {

AVCaptureSession - Stop Running - take a long long time

与世无争的帅哥 提交于 2019-11-29 23:13:07
问题 I use ZXing for an app, this is mainly the same code than the ZXing original code except that I allow to scan several time in a row (ie., the ZXingWidgetController is not necesseraly dismissed as soon as something is detected). I experience a long long freeze (sometimes it never ends) when I press the dismiss button that call - (void)cancelled { // if (!self.isStatusBarHidden) { // [[UIApplication sharedApplication] setStatusBarHidden:NO]; // } [self stopCapture]; wasCancelled = YES; if

Android ZXing Get Barcode Image

回眸只為那壹抹淺笑 提交于 2019-11-29 22:29:06
I am using Zxing library to generate a barcode in my Android application Intent intent = new Intent("com.google.zxing.client.android.ENCODE"); intent.putExtra("ENCODE_FORMAT", "UPC_A"); intent.putExtra("ENCODE_DATA", "55555555555"); startActivityForResult(intent,0); Is there anyway to save the generated image in my application which is calling Zxing? I see that in my onActivityResult I get intent null. Thanks in advance for your help Take the views cache and save it in bitmap something like this View myBarCodeView = view.getRootView() //Else this might return null myBarCodeView

Android Zxing change orientation to portrait

我是研究僧i 提交于 2019-11-29 20:08:55
I'm trying to rotate Zxing display after reading a few questions and posts about the issue. After following the instructions, the display did rotate, but the rectangle of the scanner is not positioned as it should (as can be seen on the image attached). This is what I have done: in CameraConfigurationManager: camera.setDisplayOrientation(90); in DecodeHandler.java byte[] rotatedData = new byte[data.length]; for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) rotatedData[x * height + height - y - 1] = data[x + y * width]; } int tmp = width; width = height; height = tmp; in

使用zxing生成二维码不带logo

穿精又带淫゛_ 提交于 2019-11-29 17:56:17
一,首先在maven中添加一下jar包 <dependency> <groupId>com.google.zxing</groupId> <artifactId>core</artifactId> <version>3.3.0</version> </dependency> 然后新建个工具类 QrcodeUtil // 图片宽度的一半 private static final int width = 500; private static final int height = 500; private static final int BLACK = 0xFF000000; private static final int WHITE = 0xFFFFFFFF; //生成二维码存放路径 private static final String destImagePath="d:\\qrcode.jpg"; //扫描二维码跳转页面 private static final String content="http://www.baidu.com"; // 二维码写码器 private static MultiFormatWriter multiWriter = new MultiFormatWriter(); /** * 生成二维码 * * @param content

ZXing.Net Encode string to QR Code in CF

北战南征 提交于 2019-11-29 13:54:40
问题 How could I encode my string into a QR Code using ZXing.Net? I can already decode, but having problems in encoding. It has an error that says: no encoder available for format AZTEC . Here is my code: IBarcodeWriter writer = new BarcodeWriter(); Bitmap barcodeBitmap; var result = writer.Encode("Hello").ToBitmap(); barcodeBitmap = new Bitmap(result); pictureBox1.Image = barcodeBitmap; 回答1: You doesn't fully initialize the BarcodeWriter. You have to set the barcode format. Try the following code