barcode

Barcode on swift 4

和自甴很熟 提交于 2019-11-26 18:51:45
I'm trying to upgrade mi app to swift 4, but the barcode reader is not working. I have isolated the barcode reader code, and still not working. The camera works but it does not detect the barcode. The code worked just fine on swift 3 iOS 10. This is the complete code import AVFoundation import UIKit class ViewController: UIViewController, AVCaptureMetadataOutputObjectsDelegate { var captureSession: AVCaptureSession! var previewLayer: AVCaptureVideoPreviewLayer! override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = UIColor.black captureSession = AVCaptureSession() let

Barcode Generation from within iOS App

喜欢而已 提交于 2019-11-26 12:07:19
问题 I want to take a numerical string and generate a simple barcode that can be read by any scanner. I can already use the camera and read a barcode but now I would like to generate a barcode. Does anyone know of an sdk that will allow me to do this, resources or code snipets? Thank you 回答1: The only free library to do this is Cocoa-Touch-Barcodes, which is a fork of cocoabarcodes. If you are considering commercial libraries, there is one called iPhone Barcode Generator. update Check this

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

How can I scan barcodes on iOS?

六月ゝ 毕业季﹏ 提交于 2019-11-26 09:16:06
How can I simply scan barcodes on iPhone and/or iPad? Sean Owen We produced the 'Barcodes' application for the iPhone. It can decode QR Codes. The source code is available from the zxing project ; specifically, you want to take a look at the iPhone client and the partial C++ port of the core library . The port is a little old, from circa the 0.9 release of the Java code, but should still work reasonably well. If you need to scan other formats, like 1D formats, you could continue the port of the Java code within this project to C++. EDIT: Barcodes and the iphone code in the project were retired

BarCode Image Generator in Java

回眸只為那壹抹淺笑 提交于 2019-11-26 08:49:48
问题 How can I create a barcode image in Java? I need something that will allow me to enter a number and produce the corresponding barcode image. Is there a free library available for this type of task? 回答1: iText is a great Java PDF library. They also have an API for creating barcodes. You don't need to be creating a PDF to use it. This page has the details on creating barcodes. Here is an example from that site: BarcodeEAN codeEAN = new BarcodeEAN(); codeEAN.setCodeType(codeEAN.EAN13); codeEAN

Releasing a unplugged virtual Serial Port

谁都会走 提交于 2019-11-26 08:39:27
I got a little problem with a USB Barcode Scanner. I am using the Scanner with the "SerialPort" class: this._barcodeScanner = new SerialPort(comPort, 9600, Parity.None, 8, StopBits.One) { Handshake = Handshake.None, ReadTimeout = 500, WriteTimeout = 500 }; this._barcodeScanner.Open(); this._barcodeScanner.DataReceived += BarcodeScannerCallback; If I unplug the USB Device while it´s opened via the "SerialPort" class, I can´t close the software properly and the virtual port stays open for all eternity or till I reboot the whole computer. So my question is, is there any way to close the virtual

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

NSCameraUsageDescription in iOS 10.0 runtime crash?

让人想犯罪 __ 提交于 2019-11-26 06:56:26
问题 Using iOS 10.0 last beta. I had tried to use Camera to scan barcode in my app, and it crashed with this runtime error. This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app\'s Info.plist must contain an NSCameraUsageDescription key with a string value explaining to the user how the app uses this data. Put this key into the plist, but it still crashed? 回答1: After iOS 10 you have to define and provide a usage description of all the

Barcode on swift 4

孤者浪人 提交于 2019-11-26 05:32:17
问题 I\'m trying to upgrade mi app to swift 4, but the barcode reader is not working. I have isolated the barcode reader code, and still not working. The camera works but it does not detect the barcode. The code worked just fine on swift 3 iOS 10. This is the complete code import AVFoundation import UIKit class ViewController: UIViewController, AVCaptureMetadataOutputObjectsDelegate { var captureSession: AVCaptureSession! var previewLayer: AVCaptureVideoPreviewLayer! override func viewDidLoad() {

How can I scan barcodes on iOS?

試著忘記壹切 提交于 2019-11-26 02:03:16
问题 How can I simply scan barcodes on iPhone and/or iPad? 回答1: We produced the 'Barcodes' application for the iPhone. It can decode QR Codes. The source code is available from the zxing project; specifically, you want to take a look at the iPhone client and the partial C++ port of the core library. The port is a little old, from circa the 0.9 release of the Java code, but should still work reasonably well. If you need to scan other formats, like 1D formats, you could continue the port of the Java