- private void setDecodeProductMode() {
- doSetDecodeMode(BarcodeFormat.UPC_A,
- BarcodeFormat.UPC_E,
- BarcodeFormat.EAN_13,
- BarcodeFormat.EAN_8,
- BarcodeFormat.RSS14);
- }
-
- /**
- * Select the 1D formats we want this client to decode by hand.
- */
- private void setDecode1DMode() {
- doSetDecodeMode(BarcodeFormat.UPC_A,
- BarcodeFormat.UPC_E,
- BarcodeFormat.EAN_13,
- BarcodeFormat.EAN_8,
- BarcodeFormat.CODE_39,
- BarcodeFormat.CODE_128,
- BarcodeFormat.ITF,
- BarcodeFormat.RSS14);
- }
-
- private void setDecodeQRMode() {
- doSetDecodeMode(BarcodeFormat.QR_CODE);
- }
-
- /**
- * Instead of calling setHints(null), which would allow new formats to sneak in, we
- * explicitly set which formats are available.
- */
- private void setDecodeAllMode() {
- doSetDecodeMode(BarcodeFormat.UPC_A,
- BarcodeFormat.UPC_E,
- BarcodeFormat.EAN_13,
- BarcodeFormat.EAN_8,
- BarcodeFormat.CODE_39,
- BarcodeFormat.CODE_128,
- BarcodeFormat.ITF,
- BarcodeFormat.RSS14,
- BarcodeFormat.QR_CODE);
- }
-
- private void doSetDecodeMode(BarcodeFormat... formats) {