MobileReaderListener

The MobileReaderListener interface is a listener that should exist for the entire duration of your connection to a reader. It will receive events related to the status of the reader, as well as opportunities to update the reader's software.

Functions

Link copied to clipboard
open fun onBatteryLevelUpdate(batteryLevel: Float, batteryStatus: BatteryStatus, isCharging: Boolean)

The Terminal reports batteryLevel, BatteryStatus and charging status every 10 minutes

Link copied to clipboard
open fun onDisconnect(reason: DisconnectReason)

This method is called when the reader has disconnected from the SDK, and includes the reason for the disconnect.

Link copied to clipboard

The terminal has finished installing a ReaderSoftwareUpdate.

Link copied to clipboard

Invoked when a connection could not be re-established with the given reader after a reasonable number of attempts.

Link copied to clipboard
open fun onReaderReconnectStarted(reader: Reader, cancelReconnect: Cancelable, reason: DisconnectReason)

Invoked when the given reader has unexpectedly disconnected and an auto reconnection process has been initiated.

Link copied to clipboard

Invoked when a connection has successfully been re-established with the given reader.

Link copied to clipboard

NOTE: An implementation of this method is required for bluetooth and usb readers.

Link copied to clipboard

The Terminal reported that the reader's battery level is low

Link copied to clipboard

The Terminal reported an event from the reader (e.g. a card was inserted).

Link copied to clipboard

The terminal reported progress on a reader software update.

Link copied to clipboard

This method is called to request that a message be displayed in your app. For example, if the message is SWIPE_CARD, your app should instruct the user to present the card again by swiping it.

Link copied to clipboard

This method is called when the reader begins waiting for input. Your app should prompt the customer to present a source using one of the given input options. If the reader emits a message, the .onRequestReaderDisplayMessage method will be called.

Link copied to clipboard

The SDK is reporting that the reader has started installation of a required update that must be completed before the reader can be used.