Grabba Driver for Android
Unified driver for Grabba devices on the Android operating system
KeyboardAPI Class Reference

Description

Provides control of keyboard wedge functionality in the Grabba Driver.

This API provides configuration and control of the keyboard wedge functionality, exposed via objects of the KeyboardListener class and its children.

Keyboard events may optionally be generated (via KeyboardListener) in response to the following events:

User interaction with this functionality occurs primarily by enabling or disabling event generation for each of the four supported technologies - see selectTechnologies() for details. Additional customisation is provided for the output associated with some technologies, e.g. see setLineDelimiter() for customisation of the line ending string.

Thread safety: Everything in this namespace is fully thread-safe.

Note
This class has no non-static methods or data; consequently, object creation is disabled.
See also
KeyboardListener, which provides support for associated events.

Static Public Member Functions

static void EnableInvalidMRZ_Events (boolean enable)
 Set whether MRZ keyboard events should be generated for all swipes, or only valid ICAO 9303 swipes. More...
 
static void enableLineDelimiter (boolean lineDelimAfterBarcode, boolean lineDelimAfterProxcard)
 Set whether the line delimiter should be output at the end of each barcode or proxcard scan. More...
 
static void selectTechnologies (boolean barcodeEnabled, boolean magstripeEnabled, boolean MRZ_Enabled, boolean proxcardEnabled)
 Select which technologies will generate keyboard output events. More...
 
static void setLineDelimiter (String newDelimiter)
 Set the line ending delimiter string. More...
 

Member Function Documentation

◆ EnableInvalidMRZ_Events()

static void EnableInvalidMRZ_Events ( boolean  enable)
static

Set whether MRZ keyboard events should be generated for all swipes, or only valid ICAO 9303 swipes.

By default, if MRZ scanning is enabled, then only MRZ swipes which pass ICAO 9303 validation (i.e. swiped MRZ was read cleanly and is fully conformant with ICAO 9303) will result in keyboard events. This function allows for keyboard events to be enabled even for MRZ swipes that do not pass validation.

Parameters
enableIf true, keyboard events are generated for all MRZ swipes (whether valid or invalid) whenever MRZ keyboard support is enabled; if false, only generate events for valid swipes.

◆ enableLineDelimiter()

static void enableLineDelimiter ( boolean  lineDelimAfterBarcode,
boolean  lineDelimAfterProxcard 
)
static

Set whether the line delimiter should be output at the end of each barcode or proxcard scan.

By default, if barcode and/or proxcard scanning are enabled then a line delimiter will be output at the end of each scan of that type. This function provides for inhibition of those trailing delimiters.

Parameters
lineDelimAfterBarcodeIf true, output the delimiter set by setLineDelimiter() (defaulting to an LF character) at the end of each scanned barcode; if false, output no delimiter at that time
lineDelimAfterProxcardIf true, output the delimiter set by setLineDelimiter() (defaulting to an LF character) at the end of each scanned proxcard or RFID tag; if false, output no delimiter at that time

◆ selectTechnologies()

static void selectTechnologies ( boolean  barcodeEnabled,
boolean  magstripeEnabled,
boolean  MRZ_Enabled,
boolean  proxcardEnabled 
)
static

Select which technologies will generate keyboard output events.

By default, no keyboard output events are sent to active Listeners::Keyboard objects from this class. Calling this function allows enabling or disabling of keyboard output events for one or more technologies.

Parameters
barcodeEnabledIf true, output keyboard events for barcode scans; if false, disable them
magstripeEnabledIf true, output keyboard events for magnetic stripe swipes; if false, disable them
MRZ_EnabledIf true, output keyboard events for MRZ swipes; if false, disable them
proxcardEnabledIf true, output keyboard events for proxcard scans; if false, disable them

◆ setLineDelimiter()

static void setLineDelimiter ( String  newDelimiter)
static

Set the line ending delimiter string.

This string is always output at the end of each magstripe or MRZ line. It is optionally also output at the end of each barcode or proxcard scan; see enableLineDelimiter() for configuration.

Parameters
newDelimiterNew line ending delimiter; default is a line-feed character