Get SimulScan Data Using DataWedge Inside Enterprise Browser as JavaScript Callback

Abhineet Agarwal -
5 MIN READ
86

The Enterprise Browser application makes it possible to acquire the SimulScan data as JavaScript callback which is captured through DataWedge inside Enterprise Browser application on Android platform.

This blog explains how to capture and process SimulScan data using DataWedge inside Enterprise Browser application as JavaScript callback. SimulScan facilitates the user to quickly capture large amounts of data. This post outlines how to easily leverage DataWedge to pull that data into an application built with Enterprise Browser.

SimulScan Overview

The SimulScan option present inside DataWedge application allows simultaneous capture of barcodes, images, text, signatures, phone numbers and other data from a scan target in a single pass. A SimulScan Input option adds this capability to DataWedge. When form data is captured according to a designated SimulScan template, data can be processed or formatted as required using Process Plug-ins. For more information, refer to the SimulScan User Guide. This feature can be used only on the device that supports SimulScan. List of supported devices is shared here.

Follow the below instructions as mentioned below:

1. Configuration at DataWedge end

Note: The below DataWedge configuration is applicable to version 6.2 and higher.

2. Configuration at Enterprise Browser end

Configuration at DataWedge(v 6.2 & higher) end:

Enable DataWedge Inside Enterprise Browser Application:

  • Open DataWedge Application. The DataWedge Profiles panel will appear.
  • Go to DataWedge Settings - From the DataWedge Profiles screen, tap the menu which appears at the top right and select Settings. The DataWedge Settings panel will appear.
  • From the DataWedge Settings panel, tap Disabled app list.
    1. A list appears showing all installed apps and packages where DataWedge is disabled.
    2. Ensure to remove/delete the Enterprise Browser app from the list so that DataWedge is enabled inside Enterprise Browser.

Note: Above step by step configuration is also shown in the below screenshot

Enable_DataWedge_Within_EB.png

Enable SimulScan Input Inside DataWedge Profile:

First, push the attached POSTAL.xml to /enterprise/device/settings/datawedge/templates on Zebra supported Android device. User can push the same using the below adb command.

adb push  /enterprise/device/settings/datawedge/templates

Also, take the printout of the attached Postal.jpg for capturing at the later stage. The POSTAL.xml is generated using Postal.jpg image.

The user can generate the custom template for any document by referring to Zebra's SimulScan Template Builder.

  • Now, Goto DataWedge Profiles screen and select the profiles i.e. Profile0 (default).
  • Profile0 (default) panel will appear. Apply the below settings in this profile:
    1. Ensure Profile enabled field is checked.
    2. Ensure SimulScan input – Enabled field is checked.
    3. Select Device selection as Camera.
    4. Select Template Selection as - POSTAL.xml.
      • You can choose any template based on your choice.

Note:

    • Above step by step configuration for Profile Selection and enabling SimulScan input is also shown in the below screenshot.

Profile.png

    • Device Selection - permits selection between the device camera and the default scanning device set by the system (recommended).
    • Template selection - sets a SimulScan template for the Profile being configured.
    • Refer here for further details on SimulScan DataWedge option.
    • SimulScan is free for many scanning scenarios when used with DataWedge and its default Templates to scan only barcodes and/or for certain types of OCR acquisition. A per-device license is required for advanced SimulScan features. For licensing details, please see the Licensing guide.

Configure & Enable Sending Of Captured SimulScan Data Using Intent:

  • Scroll down till Intent output field inside Profile0 (default) panel and apply the below settings:
    1. Ensure Intent output – Enabled field is checked.
    2. Set Intent action as com.symbol.dwss.action
    3. Set Intent delivery as Broadcast intent

Note: Above step by step configuration is also shown in the below screenshot.

Intent_Profile.png

Configuration at Enterprise Browser end:

  1. Download and Install Enterprise Browser binary on Zebra Android Device supported by Enterprise Browser application. Enterprise Browser is available here.
  2. Launch Enterprise Browser for extracting Enterprise Browser Config.xml which is used for setting the runtime configuration parameters of Enterprise Browser application.
    • After launch, extract Config.xml from //Android/data/com.symbol.enterprisebrowser present on the device. Here refers to /sdcard or /sdcard1 etc., depending on the Zebra Android device used.
  3. Open Config.xml and apply the below settings:
    • Set usedwforscanning  tag to 1 in Config.xml. This is used for enabling DataWedge inside Enterprise Browser application. For more details, refer to Enterprise Browser - DataWedge documentation.

....

....

  • Enable the IntentReceiver tags in Config.xml as shown below. For more details, refer to Enterprise Browser - Intent Receiver documentation.
    • Set EnableReceiver tag to 1 in Config.xml.
    • Set IntentAction value to com.symbol.dwss.action in Config.xml.

....

....

    • Set StartPage tag to SimulScanTestPage.html in Config.xml as shown below:

file://%INSTALLDIR%/SimulScanTestPage.html" name="Menu"/>

Note:

  • In the above example, I am storing SimulScanTestPage.html inside Enterprise Browser installed directory present in the device.
  • SimulScanTestPage.html has a logic where SimulScan data captured using DataWedge application gets received inside Enterprise Browser application as a JavaScript callback.
  • SimulScanTestPage.html logic is covered below.

4. Copy updated Config.xml to the Enterprise Browser installed directory in the device after all the above-mentioned settings are applied.

5. Create SimulScanTestPage.html as shown below and place the same inside Enterprise Browser installed directory in the device.

Note:

      • ebapi-modules.js is used for accessing the Enterprise Browser JavaScript API's.
      • SimulScanTestPage.html receives the SimulScan data as JavaScript callback using Enterprise Browser Intent API.

Enterprise Browser SimulScan Test Page


Enterprise Browser SimulScan Test Page









profile

Abhineet Agarwal

A smile is a curve that sets everything straight.

Please Register or Login to post a reply

Replies