Platform Docs

Working with UI state messages

The Clover device transmits UI state messages to the SDK, and the SDK broadcasts these for consumption by integrated apps. For semi-integrated setups, the customer-facing Clover device may not be visible to the merchant. These informational messages can be used for guiding the merchant through the transaction flow by displaying messages on the POS that correspond to what is shown to the customer.


UI state messages are not guaranteed to appear in a specific order, in a specific number, or even appear at all. Custom flows or business logic should not be designed in response to any UI state.

Listening for UI messages

The SDK provides two listener methods for UI state messages: onDeviceActivityStart and onDeviceActivityEnd. A simple implementation of these methods could display a pop-up message to give the merchant a notification of what is happening on the Clover device screen as the customer proceeds through the various steps of the transaction. The Remote Pay Android Example POS shows how to display the event message using a toast.

public void onDeviceActivityStart(final CloverDeviceEvent deviceEvent) {
  Log.d(TAG, "onDeviceActivityStart: CloverDeviceEvent: " + deviceEvent);
  lastDeviceEvent = deviceEvent.getEventState();
  runOnUiThread(new Runnable() {
    public void run() {
    ((TextView) findViewById(;
    Toast.makeText(ExamplePOSActivity.this, deviceEvent.getMessage(), Toast.LENGTH_SHORT).show();
    LinearLayout ll = (LinearLayout) findViewById(;

    for (final InputOption io : deviceEvent.getInputOptions()) {
      Button btn = new Button(ExamplePOSActivity.this);
      btn.setOnClickListener(new View.OnClickListener() {
      public void onClick(View v) {

When this code is run, the state message sent from the device for the Add a Tip screen (Customer is tipping...) is displayed on the POS app as shown in the following image.

Updated about a year ago

Working with UI state messages

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.