Customize PINPAD GUI

API Overview

setupCallbackHandler

boolean setupCallbackHandler(PinPadCallbackHandler handler)

This API allows you to set a custom callback handler for PINPAD inputs in your POS application. When a PIN is inputted on the PINPAD, the specified callback handler is triggered.

Parameters

handler

PinPadCallbackHandler, it can nob be null.

Returns

boolean

a boolean representation of the result.

true if success. false if failure.

processCallback of PinPadCallbackHandler

void processCallback(byte[] data);

The API provides a method to set this callback handler.

Parameters

data

pin data from the kernel. date[0] is the count of input pin.

Implementation Steps

  1. Initialize the PINPAD:

    • Before setting up the callback handler, ensure to call the 'open' method to initialize the PINPAD.

  2. Setting the Callback Handler:

    • Use the 'setupcallbackhandler' method to assign your custom callback handler.

    • Once this handler is set, the default PINPAD user interface (UI) will not appear.

  3. Handling PIN Input:

    • The driver will send the count of the inputted PIN to the callback handler.

    • Your application (referred to as the third-app) can then process this inputted PIN count as needed.

Snippet code:

Demo

Please download the project source code.

Last updated