Skip to main content

Migrating to Newer Products

Overview

DXU is not supported on devices running Android 13 or the Memor 11. Applications that rely on interfaces exposed by DXU will need to be modified to use alternative interfaces. This topic discussed how to migrate the following DXU interfaces to alternate interfaces:

Remote View

Remote view is not supported on devices without DXU. Instead a third party solution, like Vysor, is recommended.

Android HTTP API

The functionality exposed by the Android HTTP API can now be accessed through the JavaScript SDK exposed by the Datalogic Enterprise Browser. The following table shows how HTTP API functions map to Javascript SDK functions:

HTTP API URIJavaScript SDK function
start_triggerDLBarcodeMgr.startDecode()
stop_triggerDLBarcodeMgr.stopDecode()
start_listenerNot supported
stop_listenerNot supported
timeout_listenerDLBarcodeMgr.onTimeout()
read_listenerDLBarcodeMgr.onScan()
disable_all_triggersDLKeyboardMgr.enableTriggers()
enable_all_triggersDLKeyboardMgr.enableTriggers()
disable_keyboardWedgeDLBarcodeMgr.setProperty()
enable_keyboardWedgeDLBarcodeMgr.setProperty()

Starting scanning

The /scan?action=start_trigger URI can be replaced with a call to the function startDecode(). This function is part of the JavaScript SDK DLBarcodeMgr class. It activates scanning in the same way as the URI.

// Pass the timeout parameter from the old URI directly into this function
DLBarcodeMgr.startDecode(timeout);

Stopping scanning

The /scan?action=stop_trigger URI can be replaced with a call to the function stopDecode(). This function is part of the JavaScript SDK DLBarcodeMgr class. It stops scanning in the same way as the URI.

// Stop scanning
DLBarcodeMgr.stopDecode();

Start and stopping listeners

The URIs /scan?action=start_listener and /scan?action=stop_listener do not have an equivalent in the JavaScript SDK.


Registering for timeout events

The /scan?action=timeout_listener URI can be replaced with a call to onTimeout(). This function is part of the JavaScript SDK DLBarcodeMgr class. Instead of setting up a listener, onTimeout() takes in a reference to a function that is called when a scan timeout occurs.

// Register a function that will be call on scan timeout.
if (!DLBarcodeMgr.onTimeout(timeoutCallbackFunction)) {
// Error occurred setting up callback
}

// Called when a scan attempt times out.
function timeoutCallbackFunction() {
// Handle timeout here
}

Registering for read events

The /scan?action=read_listener URI can be replaced with a call to onScan(). This function is part of the JavaScript SDK DLBarcodeMgr class. Instead of setting up a listener, onScan() takes in a reference to a function that is called when a barcode scan occurs.

When a barcode scan occurs, instead of returning data in multiple formats (text, json, or xml), an object is passed into the callback function that contains the barcode data. This object contains the symbology ID, barcode text (only printable characters), and the raw barcode data.

// Register a function that will be call on read.
if (!DLBarcodeMgr.onTimeout(scanCallbackFunction)) {
// Error occurred setting up callback
}

// Called when a barcode is read.
function scanCallbackFunction(scan) {
// Get the code ID
const symbology_id = scan.id;

// Get the data as text
const barcode_data = scan.text;
}

Disabling all triggers

The /scan?action=disable_all_triggers URI can be replaced with a call to the function enableTriggers(). This function is part of the JavaScript SDK DLKeyboardMgr class. It disables triggers in the same way as the URI.

To disable triggers pass a false into the function.

// Disable all triggers
DLKeyboardMgr.enableTriggers(false);

Enabling all triggers

The /scan?action=enable_all_triggers URI can be replaced with a call to the function enableTriggers(). This function is part of the JavaScript SDK DLKeyboardMgr class. It enables triggers in the same way as the URI.

To enable triggers pass a true into the function.

// Enable all triggers
DLKeyboardMgr.enableTriggers(true);

Disabling keyboard wedge

The /scan?action=disable_keyboardWedge URI can be replaced with a call to the function setProperty(). This function is part of the JavaScript SDK DLBarcodeMgr class. Calling this function with the correct property ID can disable wedge in the same way as the URI.

To disable wedge, the property ID parameter should be WEDGE_KEYBOARD_ENABLE and the value parameter should be false.

// Disable wedge
DLBarcodeMgr.setProperty(WEDGE_KEYBOARD_ENABLE, false);

Enabling keyboard wedge

The /scan?action=enable_keyboardWedge URI can be replaced with a call to the function setProperty(). This function is part of the JavaScript SDK DLBarcodeMgr class. Calling this function with the correct property ID can enable wedge in the same way as the URI.

To enable wedge, the property ID parameter should be WEDGE_KEYBOARD_ENABLE and the value parameter should be true.

// Enable wedge
DLBarcodeMgr.setProperty(WEDGE_KEYBOARD_ENABLE, true);

Android Intents

The functionality exposed by the DXU Android Intents have been replaced with Scan2Deploy and System Update Service intents.

The following table shows how DXU intents map to newer intents:

DXU IntentNew Intent
com.datalogic.dxu.action.APPLY_SETTINGSdatalogic.scan2deploy.intent.action.START_SERVICE
com.datalogic.dxu.action.FIRMWARE_UPDATEcom.datalogic.systemupdate.action.FIRMWARE_UPDATE
com.datalogic.dxu.action.RESETdatalogic.scan2deploy.intent.action.START_SERVICE

Apply Settings

DXU configuration files are not supported on devices without DXU. Instead Scan2Deploy profiles should be used instead to configure the device. Scan2Deploy profiles can be created using Scan2Deploy Studio. Like with DXU configuration files, Scan2Deploy profiles can be applied using a broadcast intent.

DXU Intent:
  • Broadcast action: com.datalogic.dxu.action.APPLY_SETTINGS
  • Broadcast receiver: com.datalogic.dxu.plugin.EnterpriseReceiver
New Intent:
  • Broadcast action: datalogic.scan2deploy.intent.action.START_SERVICE
  • Broadcast receiver: com.datalogic.scan2deploy.S2dServiceReceiver

The following table shows how extras map between the old DXU intent and the Scan2Deploy intent:

DXUScan2DeployNotes
pathprofile_pathScan2Deploy intent uses TAR files instead of config files.
uri-Not needed by Scan2Deploy

Firmware Update

To update firmware on devices without DXU, an intent should be sent to the System Update Service. This service supports a firmware update intent that is similar to the one exposed by DXU.

DXU Intent:
  • Broadcast action: com.datalogic.dxu.action.FIRMWARE_UPDATE
  • Broadcast receiver: com.datalogic.dxu.plugin.FirmwareReceiver
New Intent:
  • Broadcast action: com.datalogic.systemupdate.action.FIRMWARE_UPDATE
  • Broadcast receiver: com.datalogic.systemupdate/.SystemUpgradeReceiver

The following table shows how extras map between the old DXU intent and the System Update Service intent:

DXUSystem Update ServiceNotes
pathpathBoth take in the local path to the OTA file.
force-The System Update Service does not support forcing upgrades.
silent-Not needed by the System Update Service.
resetTyperesetSame functionality, but different reset values (0 = none, 1 = factory, and 2 = enterprise).

Device Reset

On devices without DXU, there does not exist an intent that can directly reset the device. Instead, you can create a Scan2Deploy profile that resets the device as part of its final action. You can then initiate the reset by using the Scan2Deploy start service intent (see Applying Settings).