Getnet DocsGetnet Docs

API Class Reference

This section provides details on the core classes, methods, and data objects used in PeripheralsLib.

PeripheralsManager

The main entry point for the library.

Constructor: PeripheralsManager(Context context)

Methods:

printBitmap

Prints a bitmap image.

  • Signatures:
    • void printBitmap(final Bitmap bitmap)
    • void printBitmap(final Bitmap bitmap, PrintBmpCallback printCallback)

magStripeRead

Initiates a read operation for health cards.

  • Signature: void magStripeRead(MagReadCallback callback)

barcodeRead

Initiates a scan using the professional barcode reader.

  • Signature: void barcodeRead(BarcodeCallback callback)

configTerminal

Applies kiosk mode configurations to the terminal.

  • Signature: void configTerminal(MSG8210 config, ConfigCallback callback)

Data Objects

MSG8210

Configuration object for configTerminal.

FieldTypeDescription
launcherAppPackageStringPackage ID for the default launcher app.
launcherAppActivityStringActivity class name for the default launcher.
enableStatusBarBooleanBlock/Allow status bar expansion.
enableNavigationBarBooleanBlock/Allow navigation button usage.
showStatusBarBooleanShow/Hide status bar.
showNavigationBarBooleanShow/Hide navigation bar.

MagHealthResponse

Response object for MagReadCallback.

FieldTypeDescription
HealthCardbooleantrue if tracks identify a health card.
Track1StringData from Track 1 (empty if not a health card).
Track2StringData from Track 2 (empty if not a health card).

Callbacks

PrintBmpCallback

  • void onSuccess()
  • void onError(String error)

MagReadCallback

  • void onSuccess(MagHealthResponse magHealthResponse)
  • void onError(int errorCode, String description)

BarcodeCallback

  • void onSuccess(BarcodeResponse barcodeResponse)
  • void onError(int errorCode)

ConfigCallback

  • void onSuccess()
  • void onError(int errorCode)