Package io.anyline2.camera
Class NativeBarcodeDetector
-
- All Implemented Interfaces:
public class NativeBarcodeDetector
-
-
Field Summary
Fields Modifier and Type Field Description public boolean
isBarcodeDetectionEnabled
public NativeBarcodeDetectionRunnable
nativeBarcodeDetectionRunnable
public boolean
isBarcodeDetectionOperational
-
Constructor Summary
Constructors Constructor Description NativeBarcodeDetector()
-
Method Summary
Modifier and Type Method Description boolean
isBarcodeDetectionEnabled()
NativeBarcodeDetectionRunnable
getNativeBarcodeDetectionRunnable()
boolean
isBarcodeDetectionOperational()
void
enableBarcodeDetection(@NonNull() NativeBarcodeResultListener barcodeResultListener, List<BarcodeFormat> format)
Allows to search for barcodes simultaneously on the same image. void
disableBarcodeDetection()
Disables the barcode detection if it has been enabled before. void
restartBarcodeDetection()
-
-
Method Detail
-
isBarcodeDetectionEnabled
boolean isBarcodeDetectionEnabled()
-
getNativeBarcodeDetectionRunnable
NativeBarcodeDetectionRunnable getNativeBarcodeDetectionRunnable()
-
isBarcodeDetectionOperational
boolean isBarcodeDetectionOperational()
-
enableBarcodeDetection
void enableBarcodeDetection(@NonNull() NativeBarcodeResultListener barcodeResultListener, List<BarcodeFormat> format)
Allows to search for barcodes simultaneously on the same image. Barcodes may be searched on the full preview image, or in the cutout area only.
The listener will be called every time an image is analyzed and barcodes are found e.g. the results are independent from the module's result.
NOTE: this will only work if the device has the Google Play Service installed. Have a look on the suggested methods to ensure the device is ready: https://developers.google.com/android/guides/setup. Also, you need to include Google Play Services in your app. For the barcode reader you need to include Mobile Vision version 7.8.0 or higher (recommended) in the build.gradle (see also vision release notes)- Parameters:
barcodeResultListener
- the listener will be called whenever barcodes have been found on an image, note that is independent from the module's result listener
-
disableBarcodeDetection
void disableBarcodeDetection()
Disables the barcode detection if it has been enabled before.
-
restartBarcodeDetection
void restartBarcodeDetection()
-
-
-
-