WSC

Streamlining Workstation Connect Configuration: A Step-by-Step Guide for Developers

Nicola De Zolt -
3 MIN READ
385
0

Foreword

This blog is an annex to the Zebra Workstation Connect User Guide for Developers (wsc-dev-ug.pdf) and is published at the following address https://developer.zebra.com/blog/streamlining-workstation-connect-configuration-step-step-guide-developers

It aims to support developers with a few annotated sample projects

A more thorough introduction to Zebra Workstation Connect (acronyms: ZWC or WSC) is found in the Zebra DevCon 2023 archive. For slides and videos, visit


Workstation Connect (WSC) pre-requisites

At the time of writing, WSC 2.0 is publicly available. Such version is only supported on Android 11, on Zebra devices that have installed a minimum LifeGuard Update version (see next table)

image

Starred (*) models additionally require the Mobility DNA Enterprise License.

Get the WSC launcher from https://www.zebra.com/us/en/support-downloads/software/productivity-apps/workstation-connect.html


Programmatically configuring WSC

WSC gets configured using a JSON configuration file, which holds all the restrictions to be applied.

This is an example of a JSON Configuration file

image

In the example above, the feature with value=1 gets enabled, and those with value=2 get disabled.

Here you can compare the original launcher (left) and how the launcher appears after the configuration is applied (right)

image

The All apps button is disabled, and the apps running on the mobile display are not listed

Developers have two options to transfer the configuration to WSC: via a Delegation Scope and Secure Storage Manager (SSM).


Using Delegation Scopes to configure WSC

  • The delegation scope to use is delegation-zebra-workstation connect-api-access-configuration-service

  • Your Administrator needs to permit your application to call the service associated with that delegation scope. To do so, the following MX feature must be used, e.g. via Stagenow

    image

  • The Service Identifier is the delegation scope name as shared above

  • The Caller Package Name is your applicationID as it appears the in module's gradle.build file

  • The Caller Signature is your app's public signature. You can extract it e.g. with https://techdocs.zebra.com/emdk-for-android/latest/samples/sigtools/

On the coding side,

  • add the following AIDL to your project, keeping the name and package name unchanged (GitHub reference)

    image

    image

  • then implement a ServiceConnection interface and in the onServiceConnected get an instance of the service binder iServiceBinder = com.zebra.valueadd.IZVAService.Stub.asInterface(service);

  • in the onStart method you can finally bind the WSC service by calling (Github reference)

      private void bindtoZVAService() {
        Intent intent = new Intent("com.zebra.workstationconnect.release");
        intent.setClassName("com.zebra.workstationconnect.release", "com.zebra.workstationconnect.DeviceManagementService");
        bindService(intent, this, BIND_AUTO_CREATE);
    }
    
  • eventually, the configuration gets transferred to the equipment by calling one single API (See here) iServiceBinder.processZVARequest( JSON Configuration string )


Using Secure Storage Manager (SSM) to configure WSC

This method is described in the WSC Administrator's Guide, on page 46 https://www.zebra.com/content/dam/zebra_new_ia/en-us/manuals/software/workstation-connect/wsc-ag-en.pdf

Refer to this code sction

  • Create the desired configuration as a JSON string
  • Persist it as a file in a folder that can be accessed by any apps
  • Feed the file to SSM using this target URI com.zebra.workstationconnect.release/enterprise/workstation_connect_config.txt

To learn how SSM works with files, refer to https://techdocs.zebra.com/ssm/1-1/guide/share-files/


Working with Desktop Shortcuts

To dynamically manage the apps' shortcuts that appear on the secondary launcher, do the following

  • manually create a set of shortcuts and export them by right-clicking the mouse on the launcher free space. Shortcuts get exported in the /enterprise/usr/Export_Shortcuts_DATE-TIME.txt file. The shortcuts are persisted as JSON values.

    image

  • in the Config.json file use the shortcutImportFile API, which is part of the configDesktopShortcuts key

  • as a value, pass the exported shortcuts

    • be mindful to escape with a backslash \ the imported JSON shortcuts

    image

    • you can drop the checksum key if you edit the shortcuts since this field is optional

      image


Techdocs Documentation and Roadmap

image

profile

Nicola De Zolt

.

Please Register or Login to post a reply

0 Replies