Class NativeBarcodeDetector


  • public class NativeBarcodeDetector
    extends java.lang.Object
    • Constructor Detail

      • NativeBarcodeDetector

        public NativeBarcodeDetector()
    • Method Detail

      • enableBarcodeDetection

        public void enableBarcodeDetection​(@NonNull
                                           NativeBarcodeResultListener barcodeResultListener,
                                           java.util.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

        public void disableBarcodeDetection()
        Disables the barcode detection if it has been enabled before.
      • isBarcodeDetectionEnabled

        public boolean isBarcodeDetectionEnabled()
      • isBarcodeDetectionOperational

        public boolean isBarcodeDetectionOperational()
      • restartBarcodeDetection

        public void restartBarcodeDetection()
      • getNativeBarcodeDetectionRunnable

        public io.anyline2.camera.NativeBarcodeDetectionRunnable getNativeBarcodeDetectionRunnable()