Java Code Examples for com.google.zxing.BarcodeFormat#values()
The following examples show how to use
com.google.zxing.BarcodeFormat#values() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ParcelableResultDecorator.java From privacy-friendly-qr-scanner with GNU General Public License v3.0 | 6 votes |
ParcelableResultDecorator(Parcel in) { try { int numBits = in.readInt(); long timestamp = in.readLong(); String text = in.readString(); BarcodeFormat barcodeFormat = BarcodeFormat.values()[in.readInt()]; byte[] rawBytes = new byte[in.readInt()]; in.readByteArray(rawBytes); ResultPoint[] resultPoints = new ResultPoint[in.readInt()]; for(int i = 0; i < resultPoints.length; i++) { resultPoints[i] = new ResultPoint(in.readFloat(), in.readFloat()); } this.result = new Result(text, rawBytes, numBits, resultPoints, barcodeFormat, timestamp); } catch (Exception e) { // result will be null if reading fails } }
Example 2
Source File: CaptureView.java From react-native-smart-barcode with MIT License | 5 votes |
public void setDecodeFormats(List<String> decode) { decodeFormats=new Vector<BarcodeFormat>(); for(BarcodeFormat format : BarcodeFormat.values()){ if(decode.contains(format.toString())){ decodeFormats.add(format); } } }
Example 3
Source File: HistoryItem.java From privacy-friendly-qr-scanner with GNU General Public License v3.0 | 5 votes |
@Ignore protected HistoryItem(Parcel in) { _id = in.readInt(); image = Converters.decodeImage(in.readString()); text = in.readString(); rawBytes = in.createByteArray(); numBits = in.readInt(); timestamp = in.readLong(); format = BarcodeFormat.values()[in.readInt()]; resultPoints = new ResultPoint[in.readInt()]; for(int i = 0; i < resultPoints.length; i++) { resultPoints[i] = new ResultPoint(in.readFloat(), in.readFloat()); } }