Build apps for Clover Station Duo 1 — Dual touch screen device

United States
Canada
Europe
Latin America

Merchants who want to increase sales completion efficiency and a dedicated customer-facing display can use the Station Duo (previously Station Pro). Station Duo splits a single device into two displays, reducing hardware redundancy.

Station Duo components

Station Duo includes the following components:

  • Station Duo Terminal: A 7-inch customer-facing terminal that is similar to the Mini (2nd Generation). The terminal provides all payment functions (with EMV chip, NFC, and MSR technologies).
  • Station Duo Display: A 14-inch merchant-facing display that is similar to Station 2018. Unlike the setup of the Station 2018 tethered to a Mini, the Station Duo display is powered by the Station Duo terminal. The display is used for all business functions without the need for the swivel functionality.
  • Printer: A stand-alone printer is optional. Unlike the advanced model Station 2018 printer, the Station Duo printer does not have a customer-facing display or tap-to-pay technologies, as the terminal handles these functions.

Build apps

Apps will launch on the merchant-facing display. If your existing merchant-facing apps run on Clover Station 2018, they should run on Station Duo when you adjust for the following:

  • API Level: Station 2018 is Android API level 24 and Station Duo is Android API level 27.
  • Payment interfaces: The merchant-facing display does not provide EMV chip, NFC, or MSR technologies. You can initiate payments with the existing Clover API. The payment screen will appear on the customer-facing terminal.
  • Swivel: The merchant-facing display does not swivel.
  • Platform class: The deprecated Platform class in the Clover Android SDK does not provide an isStationPro() method. Use the Platform2 class or standard Android APIs to detect system features and capabilities instead.

Apps that run on the customer-facing display are likely to need a number of changes to function properly. You can purchase a Dev Kit to test your apps.

You can build and launch apps on the customer-facing display using:

Use the Pay Display framework to build and launch apps on the customer-facing display.

Work with Station Duo hardware

Use payment interfaces

The customer-facing terminal includes an EMV chip card reader, NFC reader, and MSR reader. Customers can directly swipe gift and loyalty cards and complete the purchase.

Work with cameras

Station Duo includes two cameras:

CameraID
Customer-facing camera (default camera)0
Merchant-facing camera1

To capture an image with a camera, use the Android MediaStore.ACTION_IMAGE_CAPTURE intent.

static int CAMERA_ID_MERCHANT_FACING = 1;
static int CAMERA_ID_CUSTOMER_FACING = 0;

Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
intent.putExtra("android.intent.extra.CAMERA_ID", CAMERA_ID_MERCHANT_FACING);
startActivity(cameraIntent);

Scan barcodes

You can use both the customer-facing display and merchant-facing display to scan barcodes. The camera on the merchant-facing display is the default barcode scanner.

The device displays a scanner preview window while scanning a barcode.

BarcodeScanner barcodeScanner = new BarcodeScanner(context);
List<Integer> available = barcodeScanner.getAvailable();
 
Bundle extras = new Bundle();
if (available.contains(BarcodeScanner.BARCODE_SCANNER_FACING_CUSTOMER)) {
    extras.putInt(Intents.EXTRA_SCANNER_FACING, BarcodeScanner.BARCODE_SCANNER_FACING_CUSTOMER);
}
 
barcodeScanner.startScan(extras);

Work with printers

The Station Duo includes an external USB-connected printer without a display screen.

PrinterConnector.getPrinters(Category)
PrinterConnector.getPrinterTypeDetails(Printer)

Work with speakers

Both the customer-facing terminal and merchant-facing display have speakers. By default, the speakers on the merchant-facing display are used to play audio.

To play audio on the customer-facing terminal, set the Android AudioAttributes.USAGE_VOICE_COMMUNICATION_SIGNALLING value.

MediaPlayer mediaPlayer = new MediaPlayer();
AudioAttributes attrs = new AudioAttributes.Builder().setUsage(
    AudioAttributes.USAGE_VOICE_COMMUNICATION_SIGNALLING).build();
mediaPlayer.setAudioAttributes(attrs);

📘

NOTE

For UI events, such as tapping a button, audio is played from the device where the UI event has occurred.

Work with microphones

Both the customer-facing terminal and merchant-facing display have microphones. By default, the merchant-facing display is used for all audio input functionality by setting the Android AudioSource.MIC value.

To use the microphone on the customer-facing terminal, set the AudioSource.CAMCORDER value.

MediaRecorder recorder = new MediaRecorder();
recorder.setAudioSouce(MediaRecorder.AudioSource.CAMCORDER);

Build with the Platform2 class

The Platform2 class in the Clover Android SDK enables you to discover Clover specific device features and capabilities. As a good practice, we highly recommend that you use Platform2 or the standard Android functions to discover device features and do not hardcode application behavior based on correlated characteristics such as: Android API level or model name.

For example, if a Clover device supports the system feature, FEATURE_TELEPHONY, it supports mobile data.

boolean mobileData = context.getPackageManager()
    .hasSystemFeature(PackageManager.FEATURE_TELEPHONY);

🚧

IMPORTANT

The Platform class in the Clover Android SDK is deprecated, please use Platform2. You may need to rebuild your app with the latest Clover Android SDK to get all Platform2 functionality necessary to develop apps on Station Duo.

Build customer-facing apps

You can build customer-facing apps on Station Duo only with custom tenders or the customer-facing platform.

The following sections detail the required configuration to ensure that your customer-facing apps run on any configuration.

Station Duo activity lifecycle

Android activities appearing on the merchant-facing display work normally as described by the Android activity documentation.

Activities appearing on the customer-facing display follow a slightly modified lifecycle; immediately after onResume is invoked the onPause method is invoked, the app remains in this paused state while being used by the customer until it is no longer visible. This may require you to move all code out of onResume and onPause, and into onStart and onStop instead. This change should generally be safe for all Clover devices.

If you truly want different behavior for Activities running on the customer-facing display of Station Duo versus running on the primary display of devices like Clover Mini you may use the new method CustomerMode.isShownOnPrimaryDisplay(Activity) to detect if your Activity is in fact running on a secondary-display that exhibits the alternate lifecycle behavior.

👍

TIP

On the Station Duo customer-facing display, an Android Activity window and components in it cannot have focus. The Activity, however, is still usable by the customer.

Customer mode

The CustomerMode class allows an app to hide the Android status bar and the navigation bar for the purpose of developing customer-facing experiences. This class has been available since the release of Clover Mini and Mobile. By default, these bars are not present on Station Duo’s customer-facing display.

If you are using customer mode for customer-facing apps deployed to older Clover devices and you intend those apps to work on Station Duo you may need to rebuild your app with a more recent version of the Clover Android SDK as there were changes made to the CustomerMode class in mid-2019.

👍

TIP

The Station Duo merchant-facing display does not swivel. If you are using customer mode on the merchant-facing display you should consider whether this functionality is desired on Station Duo. If so, ensure that merchants can exit customer mode so the merchant operator does not end up trapped in your app.

Keyboard or Input Method Editor (IME)

Since activities on the customer-facing display cannot have focus, you cannot use Android IME keyboard to accept input. Instead, if your customer-facing app requires a soft keyboard, you can use the Clover Android SDK provided Intents.ACTION_KEYPAD Activity to gather input from the user.

Toast messages

Toast messages can only appear on apps on the merchant-facing display. You cannot use toast messages on the customer-facing display. For apps running on the customer-facing display, use other UI components to display messages.

Station Duo (Previously Station Pro) Webinar

You'll learn valuable information about Station Duo and developing for Android in the Station Duo webinar and the Q&A link.