public TerminalListener
The TerminalListener interface should be implemented in order to receive updates from
a class Terminal instance.
Use of this SDK is subject to the Stripe Terminal Terms: https://stripe.com/terminal/legal
class Terminal| Modifier and Type | Interface and Description |
|---|---|
static class |
TerminalListener.DefaultImpls
The
TerminalListener interface should be implemented in order to receive updates from
a class Terminal instance. |
| Modifier and Type | Method and Description |
|---|---|
void |
onConnectionStatusChange(ConnectionStatus status)
The
class Terminal's connection status changed. |
void |
onPaymentStatusChange(PaymentStatus status)
The
class Terminal's payment status changed. |
void |
onReportLowBatteryWarning()
The
class Terminal reported that the reader's battery level is low |
void |
onReportReaderEvent(ReaderEvent event)
The
class Terminal reported an event from the reader (e.g. a card was inserted). |
void |
onUnexpectedReaderDisconnect(Reader reader)
The
class Terminal disconnected unexpectedly from the reader. |
void onReportReaderEvent(@NotNull
ReaderEvent event)
The class Terminal reported an event from the reader (e.g. a card was inserted).
event - The event reported by the readerclass Terminalvoid onReportLowBatteryWarning()
The class Terminal reported that the reader's battery level is low
class Terminalvoid onUnexpectedReaderDisconnect(@NotNull
Reader reader)
The class Terminal disconnected unexpectedly from the reader.
In your implementation of this method, you may want to notify your user that
the reader disconnected. You may also call Terminal.discoverReaders to begin scanning
for readers, and attempt to automatically reconnect to the disconnected reader.
Be sure to either set a timeout or make it possible to cancel calls to
Terminal.discoverReaders
reader - The previously connected reader.class Terminal,
Terminal.discoverReaders,
Terminal.discoverReadersvoid onConnectionStatusChange(@NotNull
ConnectionStatus status)
The class Terminal's connection status changed.
Note: You should not use this method to detect when a reader unexpectedly disconnects from your app, as it cannot be used to accurately distinguish between expected and unexpected disconnect events.
To detect unexpect disconnects (e.g. to automatically notify your user), you should instead use the .onUnexpectedReaderDisconnect method.
status - The terminal's new connection status.class Terminal,
.onUnexpectedReaderDisconnectvoid onPaymentStatusChange(@NotNull
PaymentStatus status)
The class Terminal's payment status changed.
status - The new payment statusclass Terminal