zxing

QR code scanner

拈花ヽ惹草 提交于 2019-11-26 16:39:37
问题 I would like to create a QR code scanner in my app. I went through the zxing ,but I could not understand it. I am interested in QR codes only. All help is highly appreciated. 回答1: Place a copy of the com.google.zxing.client.* source packages into your project. You can start the zxing scanning activity like this: Intent intent = new Intent(this, CaptureActivity.class); startActivityForResult(intent, 0); In the same activity that you invoked the CaptureActivity in you can handle the result when

How to integrate ZXing Library to Android Studio for Barcode Scanning?

喜你入骨 提交于 2019-11-26 15:38:06
问题 I've been looking all over internet how to include zxing library to my project, and I found this tutorial: http://blog.dihaw.com/integrating-zxing-in-your-android-app-as-standalone-scanner/ But when I reach the point that you need to check for BeepManager to add the R import I get all kinds of errors in my project (Even on the MainActivity) that it couldn't find R. Also I found this one https://github.com/journeyapps/zxing-android-embedded/blob/master/README.md which seemed a lot easier

Calling barcode scanner on a button click in android application

余生颓废 提交于 2019-11-26 15:22:02
问题 I have downloaded the zxing 1.6 and was able to successfully run a standalone barcode scanner through it. Now this scanner is in another project and (the CaptureActivity) and I have my app's different project called MyProj , all I want to do is on click of button in my project call CaptureActivity in another project , how do I import that entire project in my project or what do I do it get this working. Thanking in advance 回答1: I think that "copying" Barcode Scanner and include it in your app

java.util.zip.ZipException: duplicate entry

余生颓废 提交于 2019-11-26 14:46:44
I have been battling this error all day in Android Studio. Project was imported from an eclipse solution. I have been trying to implement all fixes that are listed for similar posts, nothing is working. I am an Android beginner. I will be happy to provide any further information. Error:Execution failed for task ':app:packageAllDebugClassesForMultiDex'. java.util.zip.ZipException: duplicate entry: com/google/zxing/BarcodeFormat.class Please help!! Should I just try to get it to run in Eclipse? // Top-level build file where you can add configuration options common to all sub-projects/modules.

How to use Zxing in android [duplicate]

十年热恋 提交于 2019-11-26 14:38:11
This question already has an answer here: Integrating the ZXing library directly into my Android application 15 answers I am new to Zxing. I am doing barcode conversion using zxing in my android application. Can anyone guide me how to include zxing to android device. Seshu Vinay If the zxing barcode scanner is installed in the mobile, its very easy: Intent intent = new Intent("com.google.zxing.client.android.SCAN"); intent.putExtra("SCAN_MODE", "PRODUCT_MODE");//for Qr code, its "QR_CODE_MODE" instead of "PRODUCT_MODE" intent.putExtra("SAVE_HISTORY", false);//this stops saving ur barcode in

Extracting information from a scanned GS1-type barcode

耗尽温柔 提交于 2019-11-26 11:28:42
问题 I am developing an app on Android Studio to get the expiry date of items upon scanning the barcode. I don\'t want the user to install ZXing barcode app separately so I embedded the ZXing code into my project. Doing this I have been able to obtain the product identifier. I also want to get product information such as the description, manufacturer and expiry date using the scanned barcode data. How can I do that? 回答1: There are two processes involved in obtaining the information represented by

Zxing Camera in Portrait mode on Android

只谈情不闲聊 提交于 2019-11-26 07:23:43
I want to show portrait orientation on Zxing 's camera. How can this be done? Here's how it works. Step 1: Add following lines to rotate data before buildLuminanceSource(..) in decode(byte[] data, int width, int height) 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; PlanarYUVLuminanceSource source = activity.getCameraManager().buildLuminanceSource(rotatedData, width, height); Step 2: Modify

QR Code encoding and decoding using zxing

不羁的心 提交于 2019-11-26 06:57:49
问题 Okay, so I\'m going to take the off chance that someone here has used zxing before. I\'m developing a Java application, and one of the things it needs to do is encode a byte array of data into a QR Code and then decode it at a later time. Here\'s an example of what my encoder looks like: byte[] b = {0x48, 0x45, 0x4C, 0x4C, 0x4F}; //convert the byte array into a UTF-8 string String data; try { data = new String(b, \"UTF8\"); } catch (UnsupportedEncodingException e) { //the program shouldn\'t

Integrate ZXing in Android Studio

六月ゝ 毕业季﹏ 提交于 2019-11-26 06:13:47
问题 I\'ll start explaining all the steps I have done and in the end what is the problem. Download ZXing-2.2 https://code.google.com/p/zxing/downloads/list Extrac all in zxing-2.2. Download and install Apache Ant http://www.youtube.com/watch?v=XJmndRfb1TU With the use of Windows Commandline (Run->CMD) navigate to the extracted directory In the commandline window - Type \'ant -f core/build.xml\' press enter and let Apache work it\'s magic At this moment is like Integrating the ZXing library

java.util.zip.ZipException: duplicate entry

断了今生、忘了曾经 提交于 2019-11-26 04:01:31
问题 I have been battling this error all day in Android Studio. Project was imported from an eclipse solution. I have been trying to implement all fixes that are listed for similar posts, nothing is working. I am an Android beginner. I will be happy to provide any further information. Error:Execution failed for task \':app:packageAllDebugClassesForMultiDex\'. java.util.zip.ZipException: duplicate entry: com/google/zxing/BarcodeFormat.class Please help!! Should I just try to get it to run in