Presentation Stand APIs

EMDK For Android 11.0

Overview

For its ruggedized Android tablets, Zebra offers the Presentation Stand, which can transform an ET40 or ET45 tablet into a self-service kiosk, check-in system, point-of-sale terminal, price checker or any number of other applications. A battery door adapter mounts to the tablet to deliver power and USB communication through the stand, and APIs allow apps to query and control functions such as screen orientation and lock state.

image The Presentation Stand allows an ET40/ET45 tablet to be useful in many scenarios while keeping the asset securely in place.
Click image to enlarge; ESC to exit.

The Presentation Stand features manual height adjustment, screen tilt, and 180-degree base rotation. The tablet is secured to the stand using an electro-mechanical lock that can be released programmatically through an app or mechanically with a release tool (sold separately). The stand can be secured to a desktop or table surface using a mounting plate. Apps communicate with the stand using Android intents and Global System Settings through a service built into the ET40 and ET45 devices that runs whenever the device is placed in the stand. The interfaces are detailed below and a test app with source code is provided to demonstrate how to use all device functions.


Requirements

  • Zebra ET40 or ET45 Enterprise Tablet
  • Presentation Stand with related accessories
  • Experience with Java and usage of Android APIs

Supported Functions

  • Set the lock state (via intents)
  • Get the rotational position (via intents)
  • Get the accessory ID (via Settings.Global)
  • Get the lock state of the stand (via Settings.Global)
  • Locking modes:
    • Auto-lock - tablet locks when placed in stand; locking LED on base turns off
    • Always unlocked - tablet is never locked when in base; base locking LED remains on

Intents

Unlock

This secure intent requires a token obtained from the MX API (not covered here). The intent data includes the unlock timeout parameter and accepts a value of either 10 or 20 seconds. These are the only valid values. When the tablet is unlocked from the stand, the green "Unlocked" status LED on the stand will illuminate for a duration equal to the selected timeout value.

Broadcast intent with secure token and timeout:


Intent i = new Intent();
i.putExtra("Token",token);
i.putExtra("TokenOwnerPackageName", getPackageName());
i.setAction("com.zebra.intent.posstand.unlock");
i.putExtra("timeoutSec", timeoutsec); // pass 10 or 20 depending on the user selection.
sendBroadcast(i);

The code snippet above is included in the test app.

RotateStateChange

This intent is broadcast by the POS service any time the service determines that the stand/tablet has rotated away from or toward the user. The intent data is a single parameter that indicates "rotated" or "not rotated." Reporting the angle of rotation is not supported.

Process the intent:


class IntentReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent){
        Log.d(TAG, "action:" + intent.getAction());

        if("com.zebra.intent.posstand.rotatestatechange".equals(intent.getAction())){
            int state = intent.getIntExtra("state", -1);
            Log.d(TAG, "rotate state:" + state);
            Toast.makeText(context, "Rotate state changed " + state,Toast.LENGTH_SHORT).show();
        }
    }
}

The code snippet above is included in the test app.

Also see Android intents


Global System Settings

accessoryType

The accessoryType contains an integer value indicating the accessory back attached to the ET40 or ET45. An accessoryType value of "3" always represents the Presentation Stand Accessory Back.

Obtain the current accessory_Type:


int accessoryType = Settings.Global.getInt(this.getContentResolver(),"accessory_type", -1); 

lockState

The lockState contains an integer value indicating the current state of the tablet lock in the stand. When using "auto-lock" mode, lockState indicates that the tablet is locked normally within the stand. The device can be unlocked by sending an unlock command (intent) to the stand. When in "always unlocked" mode, lockState indicates that the tablet is unlocked.

  • 1 = locked
  • 2 = unlocked

Activate the "always unlocked" state by sliding the small shield on the stand head down over the lock plunger. This manual operation cannot be controlled programmatically.

Get the lockState value:


int lockState = Settings.Global.getInt(this.getContentResolver(),"lockState", -1); 

rotateState

The rotateState contains an integer value indicating the current position of the stand/tablet relative to the user. The "rotated" state indicates that it is facing away from user and not rotated.

  • 1 = rotated
  • 2 = not rotated

Get current rotateState value:


int rotateState = Settings.Global.getInt(this.getContentResolver(),"rotateState", -1);

Also see Global System Settings


Test App

The POS Test App demonstrates APIs for interacting with the Presentation Stand, which provides a physical locking mechanism plus power and USB interface to the ET40/ET45 tablet through the Battery Door Adapter (optional, see below).

Download POS Test App
Code is for demonstration purposes only; not for use in production environments.

Install test app using ADB:


adb install POSStandDemoApp.apk 

File name might vary slightly based on the app version.

After the test app is installed, simply double-tap its icon to launch.

image Click image to enlarge; ESC to exit.

POS Test App Features

  • Read the Accessory ID- This is a fixed value for the Presentation Stand accessory back.
  • Unlock the tablet from the stand.
  • Show the lock state (locked or unlocked) of the tablet in the stand
    The stand has two modes for locking, "auto-lock" and "always unlocked." The API can be used to determine which mode is currently in use.
  • Show the rotational position (rotated / not rotated) of the tablet/stand relative to the user.

Part Numbers

  • Presentation Stand (STND-ET4X-10POS1-01)
  • Accessories (sold separately):
    • Battery Door Adapter (MISC-ET4X-BTDPS-01)
    • Power supply (PWR-BGA12V50W0WW)
    • DC cable (CBL-DC-388A2-01)
    • Country-specific grounded AC line cord for power supply SKU
    • Desktop Mounting Plate (BRKT-ET4X-DSKPS-01)
    • Mechanical release tool pack of 20 (KT-MC18-CKEY-20)

For more information about these products, see the ET40 and ET45 Accessories Guide (.pdf).


Also See