15 Replies Latest reply on Mar 28, 2018 10:47 PM by ABHINEET AGARWAL

    Get the scanned data using DataWedge inside Enterprise Browser as JavaScript callback

    ABHINEET AGARWAL

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

      This blog explains how to scan and process barcode data using DataWedge inside Enterprise Browser application as JavaScript callback.

       

      Follow the below instructions as mentioned below:

      • Configuration at DataWedge end

      Note: The below DataWedge configuration is applicable from version 6.0.1 and higher.

      • Configuration at Enterprise Browser end

       

      Configuration at DataWedge(v 6.0.1 & higher) end:

        1. Open DataWedge Application. The DataWedge Profiles panel will appear.
        2. Go to DataWedge Settings - From the DataWedge Profiles screen, tap the menu which appears at top right and select Settings. The DataWedge Settings panel will appear.
        3. From the DataWedge Settings panel, tap Disabled app list.
          • A list appears showing all installed apps and packages where DataWedge is disabled.
          • Ensure to remove/delete the Enterprise Browser app from the list so that DataWedge is enabled inside Enterprise Browser.
        4. Go back to DataWedge Profiles screen and select the profiles i.e. Profile0 (default).
        5. Profile0 (default) panel will appear. Apply the below settings in this profile:
          1. Ensure Profile enabled field is checked.
          2. Ensure Barcode input – Enabled field is checked.
          3. Scroll down till Intent output field inside Profile0 (default) panel and apply the below settings:
            • Ensure Intent output – Enabled field is checked.
            • Set Intent action as com.symbol.dw.action
            • Set Intent delivery as Broadcast intent

       

      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 "/<mass_storage_location>/Android/data/com.symbol.enterprisebrowser" present on the device. Here <mass_storage_location> 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.

      <Applications>

          <Application>

            ....

            <usedwforscanning  value="1"/>

            ....

          <Application>

       

        <Applications>

       

          • 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.dw.action" in Config.xml.

      <Applications>

          <Application>

            ....

            <IntentReceiver>

              <EnableReceiver  value="1"/>

              <IntentAction  value="com.symbol.dw.action"/>

              <IntentCategory  value=""/>

            </IntentReceiver>

            ....

          <Application>

       

        <Applications>

          • Set "StartPage" tag to TestPage.html in Config.xml as shown below.

      <General>

      <Name value="Menu"/>

      <StartPage value="file://%INSTALLDIR%/TestPage.html" name="Menu"/>

      </General>

                               Note:

            • In the above example, I am storing TestPage.html inside Enterprise Browser installed directory present in the device.
            • TestPage.html has a logic where scanned data using DataWedge is getting captured through JavaScript callback inside Enterprise Browser application.
            • TestPage.html logic is covered below.

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

      5. Create TestPage.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.

      <html>

      <head>

      <title>EB Test Page</title>

        <script type="text/javascript" charset="utf-8" src="ebapi-modules.js"></script>

        <script type="text/javascript">

              var outputData = "";

      function myIntentListenerCallback(myIntentData){

      if((myIntentData != null) && (myIntentData.action == "com.symbol.dw.action")){

      var dataWedgeScannedData = myIntentData.data;

      outputData = "<BR/> <b>Scanned Data:</b> <BR/>" +

      "<BR/> Intent Type:" + myIntentData.intentType + "<BR/>" +

      "<BR/> Intent Action:" + myIntentData.action + "<BR/>" +

      "<BR/> Decode Source:" + dataWedgeScannedData["com.symbol.datawedge.source"] + "<BR/>" +

      "<BR/> Decode Label Type:" + dataWedgeScannedData["com.symbol.datawedge.label_type"] + "<BR/>" + 

      "<BR/> Decode Data:" + dataWedgeScannedData["com.symbol.datawedge.decode_data"] + "<BR/>" +

      "<BR/> Decode Data String:" + dataWedgeScannedData["com.symbol.datawedge.data_string"] + "<BR/>";

      var ouptutDiv = document.getElementById("myIntentDataDiv");

      ouptutDiv.innerHTML = outputData;

      }

      }

      function startIntentListener()

      {

      var startListeningDiv = document.getElementById("intentMessageDiv");

      startListeningDiv.innerHTML = "Enterprise Browser is listening the DataWedge Intent. <BR/>Scan any data using DataWedge.<BR/><BR/>";

      EB.Intent.startListening(myIntentListenerCallback);

      }

      function registerIntent(){

      startIntentListener();

      }

        </script>

      </head>

      <body onload="registerIntent();">

      <h1>EB Test Page</h1>

      <hr>

      <div id="intentMessageDiv"></div>

      <div id="myIntentDataDiv"><b>Scanned Data:</b></div>

      </body>

      </html>

      Also attaching the Enterprise Browser Config.xml, TestPage.html and ebapi-modules.js for everyone reference.

       

      This is how one can use to get the scanned data inside Enterprise Browser application scanned through DataWedge using Intent.

        • Re: Get the scanned data using DataWedge inside Enterprise Browser as JavaScript callback
          David Garratt

          Your description above is very useful but I do have a question. I am trying to migrate from Pocket Browser 2.2.2 to EB 1,7 and find that my javascript is not called when a barcode is scanned now.

           

          My html currently has this at the top

           

          <META HTTP-Equiv="scannernavigate" Content="Javascript:doScan('%s', '%s', %s, '%s', %s);">

          <META HTTP-Equiv="scanner" Content="DecodeEvent:url('javascript:doScan('%s', '%s', %s, '%s', %s);')">

           

          and Javascript like this

           

            <script language="javascript" type="text/javascript">

            function focusIt() {

            document.productionConfirm.sscc.focus();

            }

           

            function doScan(data, source, type, time, length) {

            document.productionConfirm.button.value = 'Submit';

            document.productionConfirm.sscc.value = data;

            document.productionConfirm.barcodeType.value = type;

            document.productionConfirm.barcodeLength.value = length;

            document.productionConfirm.submit();

            }

           

            function goBack() {

            window.history.back();

            }

            </script>

           

          So my question is can I replicate this event driven action (scanning calling javascript) bu just using EB 1.7 or do you need to have DataWedge as per your example above

           

          I have looked at both EB 1.7 Scanner API documentation but not found any clear example I can use.

           

          An example would be most helpful.

           

          Dave

            • Re: Get the scanned data using DataWedge inside Enterprise Browser as JavaScript callback
              David Garratt

              Looking around further I suspect I'm going to need to use an approach like this - but I've not tested it yet.

               

              <script type="text/javascript" charset="utf-8" src="javascript/ebapi-modules.js"></script>

               

              <SCRIPT LANGUAGE="JavaScript">

               

                function ScanFunc(data, source, type, time, length, theEvent)

                {

                message.innerHTML = data + ' (' + theEvent + ')';

                }

               

                function focusIt() {

               

                document.validateDUSelect.validateOrder.focus();

               

                fnScanEnable();

               

                }

               

                function fnScanEnable() {

                    EB.Barcode.enable({allDecoders:true},fnBarcodeScanned);

                      document.getElementById('scanData').value

                  = "enabled: press HW trigger to capture.";  

                }

               

                function fnBarcodeScanned(jsonObject) {

                  console.log("Barcode Scanned:{" + JSON.stringify(jsonObject) + "}");

                  document.getElementById('scanData').value = "barcode: " + jsonObject.data;

                }

               

              </SCRIPT>

               

              Is this the right idea ? Do I need to do some cleanup when leaving the web page ?

              • Re: Get the scanned data using DataWedge inside Enterprise Browser as JavaScript callback
                ABHINEET AGARWAL

                Dear Dave,

                 

                There are various ways to Scan the barcode data within EB which is mentioned below:

                1. Scan using EB Barcode API. The document is referenced here. Sample example is shown here. Note: ebapi-modules.js need to be included in your page before invoking EB Barcode API.
                2. Scan using legacy Scanner API. The document is referenced here. Sample example is shown here. Note: elements.js need to be included in your page before invoking Scanner API.
                3. Scan using Scanner API in Meta Tag manner.
                4. Scan using DataWedge as a Keystroke input. For which usedwforscanning config tag must be set to 1 in EB Config.xml as shown here: <usedwforscanning  value="1"/>
                5. Scan using DataWedge via Intent which I have explained above.

                 

                Example 1:

                I see that you are using Scanner API invoked in Meta Tag manner inside the page in one of the examples.

                You can refer to the below example for enabling Scanner through Meta Tags and scanning the data and retrieving the same inside the registered callback i.e. doScan.

                <html>

                <head>

                        <META HTTP-Equiv="scanner" Content="enabled;DecodeEvent:url('javascript:doScan('%s', '%s', %s, '%s', %s);')">

                        <script language="javascript" type="text/javascript">

                              function doScan(data, source, type, time, length) {

                                     alert("Data:" + data + ", Type:" + type + ", Length:" + length); //Just trying to alert the scanned data.

                              }

                       </script>

                </head>

                <body>

                      <h1>EB Scanner Meta Tag Test Page</h1>

                      <hr>

                </body>

                </html>

                 

                Example 2:

                I also see that you are trying to use EB Barcode API in another example mentioned above. You can refer to the below example for enabling Scanner using EB Barcode API and scanning the data and retrieving the same inside the registered callback i.e.

                 

                <html>

                <head>

                <script type="text/javascript" charset="utf-8" src="ebapi-modules.js"></script>

                <script language="javascript" type="text/javascript">

                  function fnScanEnable() {

                        EB.Barcode.enable({allDecoders:true},fnBarcodeScanned);

                        document.getElementById('scanData').innerHTML = "enabled: press HW trigger to capture.";

                  }

                function fnBarcodeScanned(jsonObject) {

                       console.log("Barcode Scanned:{" + JSON.stringify(jsonObject) + "}");

                       document.getElementById('scanData').innerHTML = "barcode: " + jsonObject.data;

                  }

                </script>

                </head>

                <body onload="fnScanEnable();">

                    <h1>EB Barcode API Test Page</h1>

                     <hr>

                     <div id="scanData">

                     </div>

                </body>

                </html>

                 

                Thanks & Regards,

                Abhineet Agarwal

                Enterprise Browser Software Lead

                  • Re: Get the scanned data using DataWedge inside Enterprise Browser as JavaScript callback
                    David Garratt

                    Although I intend to move to the EB API method of working I have found that the meta tag approach does not work. The code was unchanged from the currently live operational solution - the javascript simply never gets execute. Is it necessary to include any .js modules for EB to maintain backward compatibility ?

                     

                    I found this example code on your website and nothing happens when the device scans a barcode via hard trigger

                     

                    <html>

                       <head>

                          <title>Hello Scan</title>

                        <meta http-equiv="scanner"

                                      content="DecodeEvent:url('Javascript: doScanDecode('%1', '%2', '%6');'); enabled;" />

                        <meta http-equiv="quitbutton" content="visibility: visible;" />

                       <script>

                          function doScanDecode(data, source, eventtype)

                          {

                             if(eventtype != 'Decode')

                                return;

                        

                             var divEl = document.getElementById('divOutput');

                             divEl.innerHTML = 'Hello ' + data + '<br/>From: ' + source);

                          }

                       </script>

                       </head>

                       <body>

                          <h2>This is my first PocketBrowser application!</h2>

                     

                          <div id="divOutput">Please scan a barcode...</div>

                       </body>

                    </html>

                      • Re: Get the scanned data using DataWedge inside Enterprise Browser as JavaScript callback
                        ABHINEET AGARWAL

                        Dear Dave,

                         

                        Have you ensured to append enabled in meta tag syntax for enabling Scanner API? Just like how I am doing below:

                          <META HTTP-Equiv="scanner" Content="enabled;DecodeEvent:url('javascript:doScan('%s', '%s', %s, '%s', %s);')">

                         

                        All EB API is listed here. Sample Application is listed here for the different set of API's which are supported within EB.

                        1. ebapi-modules.js is always required to be referenced on the page when Enterprise Browser APIs are used.
                        2. elements.js is required to be referenced on the page only on Android platform when PocketBrowser 3.x APIs & RhoElements 2.x APIs are used as a Java Scriptable object and not as Meta Tag.

                         

                        We also have EB Config tag to inject EB ebapi-modules.js & elements.js library on every page dynamically by enabling the below tag available in EB Config.xml.

                        <InjectEBLibraries>

                            <JSLibraries value="1"/>

                          </InjectEBLibraries>

                        Refer documentation for Injection of JSLibraries here. Note: If the existing HTML page(s) invoke EB APIs using HTML meta tags and/or onload attributes, JSLibraries parameter should be used only if invocation was through DOM injection.

                         

                        Thanks & Regards,

                        Abhineet Agarwal

                        Enterprise Browser Software Lead

                          • Re: Get the scanned data using DataWedge inside Enterprise Browser as JavaScript callback
                            David Garratt

                            Yes I have that - however I now have a new theory as to what might be happening (or not happening)

                             

                            I am testing against a customer build scanner using their EB 1,7 build and config. On the windows desktop I see an icon for Data Wedge Demo.

                             

                            Just as an experiment I loaded just a random app like Microsoft IE Browser on the device and positioned the cursor on the address bar.

                             

                            I then scanned a barcode and the data from the barcode was sent to the address bar.

                             

                            This means to me that the Data Wedge is active and I am wondering if the reason my web page is not seeing any scan events is because Data Wedge is intercepting them and capturing the event before EB.

                             

                            I put some debug into a application web page and I get the page load / unload events which also enable / disable the Scanner. But I never see any fnBarcodeScanned messages.

                             

                            Does this sound like what is happening ? Is there any workaround ?

                             

                            Dave

                             

                            <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>

                            <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

                            <html>

                             

                            <head>

                            <META http-equiv="Pragma" content="no-cache">

                            <META http-equiv="expires" content="0">

                             

                            <title>Process Order Select</title>

                            <link href="style/commander.css" rel="stylesheet" type="text/css" />

                            <script type="text/javascript" charset="utf-8" src="javascript/ebapi-modules.js"></script>

                            </head>

                             

                            <jsp:useBean id="Lang" class="com.commander4j.bean.JLanguage" scope="page">

                              <jsp:setProperty name="Lang" property="hostID" value="<%=session.getAttribute(\"selectedHost\")%>" />

                              <jsp:setProperty name="Lang" property="sessionID" value="<%=session.getId()%>" />

                              <jsp:setProperty name="Lang" property="languageID" value="<%=session.getAttribute(\"language\")%>" />

                            </jsp:useBean>

                             

                            <body onLoad="pageLoad()" onunload="pageExit()">

                              <form id="validateDUSelect" name="validateDUSelect" action="Process" method="post">

                              <h2>

                              <%=Lang.getText("web_Barcode_Validate")%>

                              </h2>

                              <br>

                              <table style="width:100%;" align="center">

                              <tr>

                              <td style="width: 50%; text-align: right"><%=Lang.getText("lbl_Process_Order")%></td>

                              <td style="width: 50%; text-align: left">

                              <%

                              String validateOrder = (String) session.getAttribute("validateOrder");

                              if (validateOrder == null)

                              validateOrder = "";

                              validateOrder = validateOrder.trim();

                              out.println(

                              "<input tabindex=\"1\" name=\"validateOrder\" type=\"text\" id=\"validateOrder\" size=\"10\" maxlength=\"10\" value=\""

                              + validateOrder + "\"/>");

                              %>

                              </td>

                              </tr>

                              </table>

                              <br>

                              <img src="./images/pallet_sscc.gif" width="200" style="display:block; margin-left:auto; margin-right:auto;">

                              <br>

                              <table style="width:100%;" align="center">

                              <tr>

                              <td style="width: 30%; text-align: right"><%=Lang.getText("web_SSCC")%></td>

                              <td style="width: 70%; text-align: left">

                              <%

                              String sscc = (String) session.getAttribute("validateSSCC");

                              if (sscc == null)

                              sscc = "";

                              sscc = sscc.trim();

                              out.println(

                              "<input tabindex=\"1\" name=\"validateSSCC\" type=\"text\" id=\"validateSSCC\" size=\"20\" maxlength=\"20\" value=\""

                              + sscc + "\"/>");

                              %>

                              </td>

                              </tr>

                              </table>

                              <br>

                              <table style="width: 100%">

                              <tr>

                              <td style="width: 100%; text-align: left">

                              <%

                              String errormessage = (String) session.getAttribute("_ErrorMessage");

                              if (errormessage == null)

                              errormessage = "";

                              errormessage = errormessage.trim();

                              out.println(errormessage);

                              %>

                              </td>

                              </tr>

                              </table>

                             

                              <table width="100%" border="0" cellpadding="0" cellspacing="0" align="center" style="height: 90px; ">

                              <tr>

                              <td width="100%" height="20" align="center"> 

                                  <input tabindex="3" type="button" name="buttonSubmit" id="buttonSubmit" value="<%=Lang.getText("web_Submit")%>"  onclick="document.validateDUSelect.button.value='Submit';document.validateDUSelect.submit();"/>  

                              <input tabindex="4" type="button" name="buttonCancel" id="buttonCancel" value="<%=Lang.getText("web_Cancel")%>"  onclick="document.validateDUSelect.button.value='Cancel';document.validateDUSelect.submit();"/>

                              <input type="hidden" id="button" name="button" value="Submit" />

                              <input type="hidden" name="formName" value="validateDUSelect.jsp" />

                              <input type="hidden" name="barcodeType" value="none" />

                              <input type="hidden" name="barcodeLength" value="0" />

                              </td>

                             

                              </tr>

                              </table>

                              </form>

                             

                             

                            </body>

                             

                            <script LANGUAGE="JavaScript">

                             

                              function pageLoad() {

                              alert("pageLoad");

                              document.validateDUSelect.validateSSCC.focus();

                             

                              fnScanEnable();

                              }

                             

                              function pageExit() {

                              alert("pageExit");

                              fnScanDisable();

                              }

                             

                              function fnScanEnable() {

                                  EB.Barcode.enable({allDecoders:true},fnBarcodeScanned);

                                    alert("fnScanEnable");

                              }

                             

                              function fnBarcodeScanned(jsonObject) {

                                alert("fnBarcodeScanned");

                                console.log("Barcode Scanned:{" + JSON.stringify(jsonObject) + "}");

                                alert(jsonObject.data);

                              }

                             

                              function fnScanDisable() {

                              EB.Barcode.disable();

                              alert("fnScanDisable");

                              }

                             

                            </script>

                             

                            </html>

                              • Re: Get the scanned data using DataWedge inside Enterprise Browser as JavaScript callback
                                ABHINEET AGARWAL

                                Dear Dave,

                                 

                                By seeing the above page, looks to me that customer is trying to use EB Barcode API and not DataWedge app for scanning the barcode. So please ensure to disable usedwforscanning EB Config tag in EB Config.xml as shown below:

                                 

                                <usedwforscanning  value="0"/>

                                 

                                 

                                Rest looks good to me on the above page.

                                 

                                Thanks & Regards,

                                Abhineet Agarwal

                                Enterprise Browser Software Lead

                                  • Re: Get the scanned data using DataWedge inside Enterprise Browser as JavaScript callback
                                    David Garratt

                                    I was under the impression that the setting you mention above was for Android only. My customer is using Windows based devices.

                                     

                                    Can I use this setting for Windows as well ?

                                      • Re: Get the scanned data using DataWedge inside Enterprise Browser as JavaScript callback
                                        ABHINEET AGARWAL

                                        Dear Dave,

                                         

                                        I was only talking w.r.t Android context. I just now realized that you are mentioning about Windows devices.

                                        I don't think why it should not work.

                                         

                                        Note: EB Config tag i.e. usedwforscanning is supported only on Android platform.

                                         

                                        Thanks & Regards,

                                        Abhineet Agarwal

                                        Enterprise Browser Software Lead

                                        • Re: Get the scanned data using DataWedge inside Enterprise Browser as JavaScript callback
                                          ABHINEET AGARWAL

                                          Dear Dave,

                                           

                                          For Windows Mobile/CE, please ensure DataWedge Application is turned off.  Also which Enterprise Browser CAB have you installed on Windows device? Can you please share me the device detail & EB Config.xml which is available under \Program Files\EnterpriseBrowser\Config.xml ?

                                           

                                          Below are some key details w.r.t Enterprise Browser Windows Mobile/CE binaries.

                                          a) Enterprise Browser with IE Engine Cab's: Only backward compatible with Pocket Browser Application.

                                          1. EnterpriseBrowser_v1.8.0.0_IE.Cab -  Enterprise Browser consists of IE Engine. Only Backward compatible with PB application running on Windows Mobile/CE device. Supports only PocketBrowser 3.X APIs.
                                          2. EnterpriseBrowser_v1.8.0.0_IE_p.cab - Enterprise Browser consists of IE Engine. Only Backward compatible with PB application running on Windows CE device. Supports only PocketBrowser 3.X APIs.

                                           

                                          Note: Only PB API's via Active X Object & Meta Tags are supported on above CAB's running on Windows Mobile/CE device. Ensure below Config tags are enabled in EB with IE Engine.

                                          <PreloadLegacyActiveX value="1"/>

                                          <UseRegularExpressions value="1"/>

                                           

                                          <EngineInUse value="IE"/>

                                           

                                          b) Enterprise Browser with Webkit Engine Cab's: Supports rich sets of features.

                                          1. EnterpriseBrowser_v1.8.0.0_WK.Cab - Enterprise Browser consists of Webkit Engine. Also Backward compatible with PB & RE application running on Windows Mobile/CE device. Supports new Enterprise Browser APIs, RhoElements 2.X APIs & PocketBrowser 3.X APIs.
                                          2. EnterpriseBrowser_v1.8.0.0_WK_p.Cab - Enterprise Browser consists of Webkit Engine. Also Backward compatible with PB & RE application running on Windows CE device. Supports new Enterprise Browser APIs, RhoElements 2.X APIs & PocketBrowser 3.X APIs.

                                           

                                          Note: PB API's via Active X Object, Meta Tags, RE 2.X APIs via JavaScript Object, RE 2.X  APIs via Generic Object &  EB APIs are supported on above CAB's running on Windows Mobile/CE device. Ensure below Config tags are enabled in EB with Webkit Engine.

                                          <PreloadLegacyActiveX value="1"/>

                                          <UseRegularExpressions value="1"/>

                                          <PreloadLegacyGeneric value="1"/>

                                          <PreloadJSObjects     value="1"/>

                                           

                                          <EngineInUse value="Webkit"/>

                                           

                                          Thanks & Regards,

                                          Abhineet Agarwal

                                          Enterprise Browser Software Lead

                                            • Re: Get the scanned data using DataWedge inside Enterprise Browser as JavaScript callback
                                              David Garratt

                                              I know the customer is running EB 1.7 at the moment. As to the CAB files I will need to check - I run a MacBook Pro which does not have an equivalent to ActiveSync.

                                               

                                              Fundamentally I thought DataWedge was primarily for applications which do not have the ability to talk to the scanner hardware themselves. My customer has setup DataWedge in default mode to capture all data and it's stopping EB from seeing any scanner triggers/events.

                                              They have DataWedge version 3.7.

                                               

                                              I was wondering if a custom profile could be created so that DataWedge would only work when Telnet is being run and not when EB is active - that would maintain some level of backwards compatibility.

                                               

                                              Given your article above I'm not sure what the strategic direction should be - to let EB interact with the scanner directly or assume that DW is running and communicate with that ? I don't want to re-write the application twice.

                                               

                                              Example of config.xml

                                               

                                              <?xml version = "1.0"?>
                                              <!--
                                              Enterprise Browser Configuration file
                                              -->
                                              <Configuration>
                                                 
                                                
                                              <DebugButtons>
                                                  
                                              <DebugButtonsEnabled value="0" />
                                                
                                              </DebugButtons>
                                                
                                                
                                              <ExitPassword>
                                                  
                                              <ExitPasswordEnabled value="0" />
                                                  
                                              <ExitPasswordValue value="" />
                                                
                                              </ExitPassword>
                                                
                                                
                                              <Settings>
                                                  
                                              <SettingsButtonEnabled value="0"/>
                                                  
                                              <SettingsPageProtectionEnabled value="0"/>
                                                  
                                              <SettingsPagePassword value=""/>
                                                
                                              </Settings>
                                                
                                                
                                              <Shortcut>
                                                  
                                              <ShortcutCreationEnabled value="0"/>
                                                
                                              </Shortcut>
                                                
                                                
                                              <Logger>
                                                  
                                              <LogProtocol   value="FILE"/>
                                                  
                                              <LogPort       value="80"/>
                                                  
                                              <LogURI        value="file://%INSTALLDIR%\Log.txt"/>
                                                  
                                              <LogError      value="1"/>
                                                  
                                              <LogWarning    value="1"/>
                                                  
                                              <LogInfo       value="1"/>   
                                                  
                                              <LogTrace      value="0"/>
                                                  
                                              <LogUser       value="0"/>
                                                  
                                              <LogMemory     value="0"/>
                                                  
                                              <LogMemPeriod  value="5000"/>
                                                  
                                              <LogMaxSize    value="5000"/>
                                                
                                              </Logger>
                                                  
                                                
                                              <FileLocations>
                                                  
                                              <RegEXFile  value="file://%INSTALLDIR%\Config\RegEx.xml"/>
                                                  
                                              <PluginFile value="file://%INSTALLDIR%\Config\Plugin.xml"/>
                                                
                                              </FileLocations>
                                                    
                                                
                                              <Screen>
                                                  
                                              <FullScreen value="1"/>
                                              <PageZoom value="1.0"/>
                                              <ShowLicenseConfirmation value="1"/>
                                                
                                              </Screen>
                                                
                                                
                                              <SplashScreen>
                                              <SplashScreenPath value="file://%INSTALLDIR%\rho\apps\app\loading.png"/>
                                                
                                              </SplashScreen>
                                                
                                                
                                              <WebServer> 
                                                  
                                              <Enabled VALUE="0"/> 
                                                  
                                              <Port VALUE="8080"/> 
                                                  
                                              <WebFolder VALUE="\Program Files\EnterpriseBrowser\rho\apps\public\api"/> 
                                                  
                                              <Public VALUE="0"/> 
                                                
                                              </WebServer>
                                               
                                                
                                              <VoidConnection>
                                                  
                                              <TrackConnection value="0"/>
                                                  
                                              <HostURL value="192.168.1.1"/>
                                                  
                                              <Message value="Establishing Connection..."/>
                                                  
                                              <Timeout value="30000"/>
                                                  
                                              <PollInterval value="5000"/>
                                                
                                              </VoidConnection>
                                                 
                                                
                                              <DeviceKeys>
                                                  
                                              <FunctionKeysCapturable    value="1"/>
                                                  
                                              <EnableFunctionKey_F1     value="1"/>
                                                  
                                              <EnableFunctionKey_F2     value="1"/>
                                                  
                                              <EnableFunctionKey_F3     value="1"/>
                                                  
                                              <EnableFunctionKey_F4     value="1"/>
                                                  
                                              <EnableFunctionKey_F5     value="1"/>
                                                  
                                              <EnableFunctionKey_F6     value="1"/>
                                                  
                                              <EnableFunctionKey_F7     value="1"/>
                                                  
                                              <EnableFunctionKey_F8     value="1"/>
                                                  
                                              <EnableFunctionKey_F9     value="1"/>
                                                  
                                              <EnableFunctionKey_F10    value="1"/>
                                                  
                                              <EnableFunctionKey_F11    value="1"/>
                                                  
                                              <EnableFunctionKey_F12    value="1"/>
                                                  
                                              <EnableApplicationKey_A1  value="1"/>
                                                  
                                              <EnableApplicationKey_A2  value="1"/>
                                                  
                                              <EnableApplicationKey_A3  value="1"/>
                                                  
                                              <EnableApplicationKey_A4  value="1"/>
                                                  
                                              <EnableApplicationKey_A5  value="1"/>
                                                  
                                              <EnableApplicationKey_A6  value="1"/>
                                                  
                                              <EnableApplicationKey_A7  value="1"/>
                                                  
                                              <EnableApplicationKey_A8  value="1"/>
                                                
                                              </DeviceKeys>
                                                
                                                
                                              <Navigation>
                                                  
                                              <NavTimeout value="45000"/>
                                                  
                                              <EnableSSL3 value="0"/>
                                                
                                              </Navigation>

                                                
                                              <Geolocation>
                                                  
                                              <GeolocationEnabled value="1"/>
                                                
                                              </Geolocation>

                                              <ScreenOrientation>
                                                  
                                              <AutoRotate value="0" />
                                                
                                              </ScreenOrientation>
                                                
                                               
                                              <TabInstance>
                                                  
                                              <NewTabPhysicalMemLimit value="100"/>
                                                  
                                              <NewTabVirtualMemLimit value="100"/>
                                                
                                              </TabInstance>
                                                
                                                
                                              <Engine>
                                                  
                                              <EngineInUse value="Webkit"/>
                                                
                                              </Engine>
                                                
                                               
                                                
                                              <UserData>
                                                
                                              </UserData>
                                                  
                                                
                                              <Applications>
                                                  
                                              <Application>
                                                    
                                                    
                                              <HTTP_Proxy value=""/>
                                                    
                                              <HTTPS_Proxy value=""/>
                                                    
                                                    
                                              <General>
                                                      
                                              <Name value="Menu"/>
                                              <StartPage value="file://\Application\Tools\Menu.html" name="Menu"/>
                                              <!--StartPage value="http://rd6webdisp.nestle.com:50701/glb/start?sap-client=101" name="Menu"/ -->
                                                      
                                              <UseRegularExpressions value="0"/>
                                                    
                                              </General>
                                                    
                                                    
                                              <ZoomKey>
                                              <ZoomInKey value=""/>
                                              <ZoomOutKey value=""/>
                                                    
                                              </ZoomKey>
                                                    
                                                    
                                              <Scanner>
                                                      
                                              <DisableScannerDuringNavigation value="1"/>
                                                      
                                              <DisableScannerInApp value="0"/>
                                                    
                                              </Scanner>
                                                    
                                                    
                                              <WebDB>
                                                      
                                              <WebStorageDBPath value="file://%INSTALLDIR%"/>
                                                      
                                              <WebSQLDBQuota value="5000000"/>
                                                      
                                              <WebSQLDBPath value="file://%INSTALLDIR%"/>
                                                    
                                              </WebDB>
                                                    
                                              <ApplicationCache>
                                                      
                                              <ApplicationCachePath VALUE="file://%INSTALLDIR%"/>
                                                      
                                              <ApplicationCacheQuota VALUE="5000000"/>
                                                    
                                              </ApplicationCache>

                                                    
                                              <NPAPI>
                                                      
                                              <NPAPIDirectory value="file://%INSTALLDIR%\NPAPI\"/>
                                                      
                                              <Preloads>
                                                        
                                              <PreloadLegacyActiveX value="1"/>
                                                        
                                              <PreloadLegacyGeneric value="1"/>
                                                        
                                              <PreloadLegacyODAX    value="1"/>
                                                        
                                              <PreloadLegacyNoSIP   value="1"/>
                                                        
                                              <PreloadLegacyAirBeam value="1"/>
                                                        
                                              <PreloadLegacyAPD     value="1"/>
                                                        
                                              <PreloadJSObjects     value="1"/>
                                                      
                                              </Preloads>
                                                    
                                              </NPAPI>
                                                    
                                                    
                                              <Preloads>
                                                      
                                              <Preload value="Scanner"/>
                                                      
                                              <Preload value="Hourglass"/>
                                                      
                                              <Preload value="SIP"/>
                                                      
                                              <Preload value="ScreenOrientation"/>
                                                    
                                              </Preloads>
                                                
                                                
                                              <Scrolling>
                                              <ScrollTechnique VALUE="FingerScroll"/>
                                                
                                              </Scrolling>
                                                
                                              <Authentication>
                                              <!--  Used for Digest Access Authentication and Basic Access Authentication -->
                                              <!--  Global  -->
                                              <!--Username VALUE=""/-->
                                              <!--Password VALUE=""/-->
                                              </Authentication>
                                                    
                                                    
                                              <HTMLStyles>
                                                      
                                              <FitToScreenEnabled    value="1" />
                                                      
                                              <ClearTypeEnabled      value="1" />
                                                      
                                              <JavascriptEnabled     value="1" />
                                                      
                                              <TextSelectionEnabled  value="0" />
                                                      
                                              <FontFamily            value="Tahoma" />
                                                    
                                              </HTMLStyles>
                                                    
                                                    
                                              <SIP>
                                                      
                                              <ResizeOnSIP  value="0"/>
                                                    
                                              </SIP>

                                                    
                                              <System>
                                                      
                                              <LowBatteryScan  value="0"/>
                                                    
                                              </System>

                                                    
                                              <Sound>
                                                      
                                              <DecodeVolume           value="5"/>
                                                      
                                              <DecodeFrequency        value="0xBB8"/>
                                                      
                                              <InvalidDecodeFrequency value="0x9C4"/>
                                                      
                                              <DecodeDuration         value="250"/>
                                                      
                                              <ScanDecodeWav          value=""/>
                                                      
                                              <ScanInvalidWav         value=""/>
                                                      
                                              <ImagerCaptureWav       value=""/>
                                                    
                                              </Sound>
                                                    
                                                    
                                              <GUI>
                                                      
                                              <SignalRefresh      value="5000"/>
                                                      
                                              <BatteryRefresh     value="5000"/>
                                                      
                                              <HourglassEnabled   value="1" />
                                                      
                                              <HourglassLeft      value="" />
                                                      
                                              <HourglassTop       value="" />
                                                    
                                              </GUI>
                                                    
                                                    
                                              <Navigation>
                                                      
                                              <BadLinkURI value="file://%INSTALLDIR%\HTML\BadLink.html"/>
                                                      
                                              <UserAgent  value="Mozilla/5.0 (WebKit; U; /%p) AppleWebKit/%w (KHTML, like Gecko) Version/%e Mobile Safari/%w" />
                                              <!--NetworkCookieDatabase value="file://%INSTALLDIR%\cookies.db"/-->
                                              <ViewportEnabled value="1"/>
                                              <VerifyPeerCertificate value="0"/>
                                              <!--ViewportWidth value="640"/-->
                                                      
                                              <Cache      VALUE="5MB"/>
                                                    
                                              </Navigation>
                                                   
                                                  
                                              <DeviceKeys>
                                                      
                                              <EnableCtrlKey_A    value="1"/>
                                                      
                                              <EnableCtrlKey_C    value="1"/>
                                                      
                                              <EnableCtrlKey_V    value="1"/>
                                                      
                                              <EnableCtrlKey_O    value="0"/>
                                                      
                                              <EnableCtrlKey_P    value="0"/>
                                                    
                                              </DeviceKeys>
                                                
                                                    
                                              <DefaultMetaTags>
                                              <MetaTag VALUE="KeyState~Visibility:Visible;top:565"/>
                                              <MetaTag VALUE="Signal~left:80;top:575;color:#0078B4;visibility:visible;"/>
                                              <MetaTag VALUE="battery~left:40;top:575;color:#0078B4;visibility:visible;"/>
                                              <MetaTag VALUE="HomeButton~left:2;top:565;color:#0078B4;visibility:visible;"/>
                                              <meta name="viewport" content="width=320, initial-scale=1"/>
                                              <META HTTP-Equiv="SIP" Content="Left:640;Top:640"/>
                                                    
                                              </DefaultMetaTags>

                                                    
                                              <CustomDOMElements value=""/>
                                                  
                                                  
                                              </Application>
                                                
                                              </Applications>
                                              </Configuration>

                                                • Re: Get the scanned data using DataWedge inside Enterprise Browser as JavaScript callback
                                                  ABHINEET AGARWAL

                                                  Dear Dave,

                                                   

                                                  There is no need to re-write the code. The code looks good to me and it should work properly if you can ensure the below two things apart from what I have mentioned earlier.

                                                   

                                                  1. Ensure that DataWedge is turned off when EB application is running on the device.
                                                  2. Please ensure that ebapi-modules.js is properly referenced in the HTML page and should not have any reference error. Or else EB Barcode API's will not work.

                                                   

                                                  Thanks & Regards,

                                                  Abhineet Agarwal

                                                  Enterprise Browser Software Lead

                                                    • Re: Get the scanned data using DataWedge inside Enterprise Browser as JavaScript callback
                                                      David Garratt

                                                      What you suggest works. I have a couple of questions however.

                                                       

                                                      Your original article above - does it only apply to Android ?

                                                       

                                                      The customer for who I am migrating an app from Pocket Browser to EB 1.7 has their scanner locked down into a default home page in kiosk mode.

                                                       

                                                      Option 1 runs Enterprise Browser and permits access to my application which as discussed needs DW to be turned off.

                                                       

                                                      Option 2 runs TelnetCE.exe in order to access SAP RF - however this needs DW to be turned on.

                                                       

                                                      Hence the problem - it's not really possible for the end user to toggle DW on and off - however if it's ON then the EB application does not work properly and if it's OFF then the Telnet application does not work.

                                                       

                                                      They have DW 3.7 installed on their MC92No Windows machines but I have read pages referring to a version 6.x - is this an update or is it a version for Android.

                                                       

                                                      I configured a new profile specifically for TelnetCE which would be active for that application - but I could not find any way to disable the Profile0 (default) application for when EB is running.

                                                       

                                                      I hope you understand this dilemma

                                                       

                                                      Dave