Class BarcodeView

    • Method Detail

      • setDecoderFactory

        public void setDecoderFactory​(DecoderFactory decoderFactory)
        Set the DecoderFactory to use. Use this to specify the formats to decode. Call this from UI thread only.
        Parameters:
        decoderFactory - the DecoderFactory creating Decoders.
        See Also:
        DefaultDecoderFactory
      • getDecoderFactory

        public DecoderFactory getDecoderFactory()
        Returns:
        the current DecoderFactory in use.
      • decodeSingle

        public void decodeSingle​(BarcodeCallback callback)
        Decode a single barcode, then stop decoding. The callback will only be called on the UI thread.
        Parameters:
        callback - called with the barcode result, as well as possible ResultPoints
      • decodeContinuous

        public void decodeContinuous​(BarcodeCallback callback)
        Continuously decode barcodes. The same barcode may be returned multiple times per second. The callback will only be called on the UI thread.
        Parameters:
        callback - called with the barcode result, as well as possible ResultPoints
      • stopDecoding

        public void stopDecoding()
        Stop decoding, but do not stop the preview.
      • createDefaultDecoderFactory

        protected DecoderFactory createDefaultDecoderFactory()
      • previewStarted

        protected void previewStarted()
        Description copied from class: CameraPreview
        Called when the preview is started. Override this to start decoding work.
        Overrides:
        previewStarted in class CameraPreview
      • pause

        public void pause()
        Stops the live preview and decoding. Call from the Activity's onPause() method.
        Overrides:
        pause in class CameraPreview