Barcode Pick View

Defined in package com.scandit.datacapture.barcode.pick.ui

Note

Barcode Pick is still in beta and may change in future versions of Scandit Data Capture SDK.

BarcodePickViewUiListener
interface BarcodePickViewUiListener

Added in version 6.20.0

onFinishButtonTapped(view)
void onFinishButtonTapped(@NonNull BarcodePickView view)

Added in version 6.20.0

Callback method that can be used to define an action that should be performed when the finish button is tapped from the view. Called from the main thread.

BarcodePickView
class BarcodePickView : RelativeLayout

Added in version 6.19.0

BarcodePickView.

The lifecycle functions onResume(), onPause() and onDestroy() should be bound to the corresponding fragment or activity lifecycle methods for the scanner to work correctly. This will allow the BarcodePickView to automatically pause and resume scanning.

Note

Scanning is only possible when in resumed state. Which means that start() won’t start the scanning flow if onResume() isn’t called before or afterwards.

newInstance(parentView, dataCaptureContext, mode, settings)
static @NonNull BarcodePickView newInstance(@NonNull ViewGroup parentView,
        @Nullable DataCaptureContext dataCaptureContext,
        @NonNull BarcodePick mode,
        @NonNull BarcodePickViewSettings settings)

Added in version 6.19.0

Initializes a BarcodePickView

newInstance(parentView, dataCaptureContext, mode, settings, cameraSettings)
static @NonNull BarcodePickView newInstance(@NonNull ViewGroup parentView,
        @Nullable DataCaptureContext dataCaptureContext,
        @NonNull BarcodePick mode,
        @NonNull BarcodePickViewSettings settings,
        @NonNull CameraSettings cameraSettings)

Added in version 6.19.0

Initializes a BarcodePickView

start()
void start()

Added in version 6.19.0

Starts the camera and the scanning process. Can be stopped by calling stop().

For instance, it can be called when creating the BarcodePickView, so that as soon as the fragment or activity is resumed, the scan flow will start.

Note

Scanning will pause and resume automatically when onPause() and onResume() respectively are called.

stop()
void stop()

Added in version 6.19.0

Pauses the camera and the scanning process. It can be started again using start().

freeze()
void freeze()

Added in version 6.20.0

Freezes the camera and the highlights position to make the selection easier. The scanning can be started again using start().

addActionListener(listener)
void addActionListener(@NonNull BarcodePickActionListener listener)

Added in version 6.19.0

Add a BarcodePickActionListener to the mode. User actions will be notified to the listener.

onResume()
void onResume()

Added in version 6.24.0

Notifies the barcode pick view that the container has resumed.

This method should be called in a Fragment or Activity’s onResume method to allow starting the scanning process or to restore a state previously paused by onPause().

onPause()
void onPause()

Added in version 6.24.0

Notifies the barcode pick view that the container has paused.

This method should be called in a Fragment or Activity’s onPause method to pause the scanning flow. The scan state will then be restored when onResume() in called.

onDestroy()
void onDestroy()

Added in version 6.19.0

Stops the camera and the scanning process. After this call the view should not be used anymore.

This method should be called in a Fragment’s onDestroyView or an Activity’s onDestroy methods to release the scanning objects.

removeActionListener(listener)
void removeActionListener(@NonNull BarcodePickActionListener listener)

Added in version 6.19.0

Removes a BarcodePickActionListener.

uiListener
@Nullable BarcodePickViewUiListener getUiListener()
void setUiListener(@Nullable BarcodePickViewUiListener value)

Added in version 6.20.0

Sets the listener which is called whenever the finish button is tapped from the view.

listener
@Nullable BarcodePickViewListener getListener()
void setListener(@Nullable BarcodePickViewListener value)

Added in version 6.20.0

Sets a BarcodePickViewListener to the mode. User actions will be notified to the listener.

hardwareTriggerSupported
boolean getHardwareTriggerSupported()

Added in version 6.23.0

Returns whether the device supports listening for hardware button events. This is true for devices with api >= 28.