JavaScript SDK
The Datalogic Javascript SDK can be downloaded from the Datalogic GitHub site.
Overview
The Datalogic JavaScript SDK allows users to write web apps that interface with the features of Datalogic Android devices through the Datalogic Enterprise Browser.
Click here for information on the Datalogic Enterprise Browser.
Download Contents
The SDK repository is organized as the contents of a web server. Its contents are described here:
Item | Description |
---|---|
index.html | Home page for SDK samples |
lib | Contains JavaScript SDK implementation files |
lib/dl_barcode.js | Implementation of barcode manager API |
lib/dl_keyboard.js | Implementation of keyboard manager API |
samples | Contains SDK sample web pages |
samples/barcode.html | Sample page to scan a barcode and display its contents. |
samples/camera.html | Sample page to take a picture with the camera, including preview. |
samples/config.html | Sample page to configure the scanner properties. |
samples/led.html | Sample page to set LED actions on a JoyaTouch cradle. |
samples/listeners.html | Sample page to listen to cradle insertion and extraction events. |
samples/location.html | Sample page to display the current device location. |
samples/microphone.html | Sample page to record audio from the device microphone. |
samples/microphone.html | Sample page to read and write data to JoyaTouch cradle. |
samples/trigger.html | Sample page to enable/disable the physical scanning triggers. |
samples/unlock.html | Sample page to lock/unlock a cradle. |
samples/res | Contains resource files used by sample pages |
samples/scripts | Contains JavaScript files used by sample pages |
samples/styles | Contains CSS styling files used by sample pages |
Using SDK
Once you've downloaded the JavaScript SDK files, you can include the desired API's in your HTML pages through a script
tag, i.e:
<script type="text/javascript" charset="utf-8" src="dl_barcode.js"></script>
Calls to the API may then be made in an additional script tag. Sample pages using the JavaScript SDK can be found in the repository on GitHub in the samples directory.
Namespaces
The SDK is divided into multiple namespaces, each with their own API for managing a different aspect of the device.
Namespace | Description |
---|---|
DLBarcodeMgr | Interface for the barcode and scanning features of the device. |
DLCradleMgr | Interface for the cradle features of the device. |
DLKeyboardMgr | Interface for the physical keyboard of the device. |
Sample Web Pages
The sample web pages provided in the SDK repository demonstrate the features of the Javascript SDK. These samples are also available on the web at https://datalogic.github.io/javascript-sdk/. Please note that these pages are only designed to be used within the Datalogic Enterprise Browser.