Grabba Driver for Android
Unified driver for Grabba devices on the Android operating system
BarcodeInterface Interface Reference

Description

Interface class for Grabba barcode reader events.

Objects which implement this interface may receive callbacks when these events occur, via delegation from a BarcodeListener object.

Note that this interface need not be directly implemented; it may be simpler to subclass BarcodeListener and thereby receive the events directly.

Thread safety: This interface is intended to be thread-safe; any classes deriving from it should ensure that the relevant methods are callable from any thread.

See also
BarcodeAPI for related API functions, and BarcodeListener for more detailed descriptions of each event.
Inheritance diagram for BarcodeInterface:
BarcodeListener

Public Member Functions

void cancelEvent ()
 Callback which is invoked when a barcode scan is cancelled. More...
 
void dataEvent (@NonNull BarcodeData data)
 Callback which is invoked when a barcode is successfully scanned. More...
 
void errorEvent (@NonNull ErrorCode error)
 Callback which is invoked when a barcode scan fails. More...
 
void startEvent ()
 Callback which is invoked when a barcode scan is triggered. More...
 
void stopEvent ()
 Callback which is invoked when a barcode scan is stopped, regardless of reason. More...
 
void timeoutEvent ()
 Callback which is invoked when barcode scanning times out. More...
 

Member Function Documentation

◆ cancelEvent()

void cancelEvent ( )

Callback which is invoked when a barcode scan is cancelled.

Note
Implementations of this method are required to be thread-safe; no guarantees are made about which thread(s) they will be called from.

Implemented in BarcodeListener.

◆ dataEvent()

void dataEvent ( @NonNull BarcodeData  data)

Callback which is invoked when a barcode is successfully scanned.

Note
Implementations of this method are required to be thread-safe; no guarantees are made about which thread(s) they will be called from.
Parameters
dataContains the data which was read, along with the ID of the symbology which was detected

Implemented in BarcodeListener.

◆ errorEvent()

void errorEvent ( @NonNull ErrorCode  error)

Callback which is invoked when a barcode scan fails.

Note
Implementations of this method are required to be thread-safe; no guarantees are made about which thread(s) they will be called from.
Parameters
errorError code indicating the reasons for the failure

Implemented in BarcodeListener.

◆ startEvent()

void startEvent ( )

Callback which is invoked when a barcode scan is triggered.

Note
Implementations of this method are required to be thread-safe; no guarantees are made about which thread(s) they will be called from.

Implemented in BarcodeListener.

◆ stopEvent()

void stopEvent ( )

Callback which is invoked when a barcode scan is stopped, regardless of reason.

Note
Implementations of this method are required to be thread-safe; no guarantees are made about which thread(s) they will be called from.

Implemented in BarcodeListener.

◆ timeoutEvent()

void timeoutEvent ( )

Callback which is invoked when barcode scanning times out.

Note
Implementations of this method are required to be thread-safe; no guarantees are made about which thread(s) they will be called from.

Implemented in BarcodeListener.