SAP ITSmobile for Android

Enterprise Browser 2.0

Overview

This guide provides instructions for modifying an EB app for Android to work with ITSmobile, the SAP middleware system built around its Internet Transaction Server (ITS). ITSmobile provides browser-based access to SAP's ERP, SRM and other enterprise apps made with the company's proprietary dynpro language. Enterprise Browser apps can be built or adapted to work with ITSmobile, and thereby to access SAP back-end enterprise apps. Doing so requires familiarity with editing the Config.xml and the HTML file(s) of EB apps.

EB 2.0 for SAP

Enterprise Browser 2.0 (and newer) includes an installation package (EnterpriseBrowser_SAP_signed_v2.0.1.0.apk) with a Config.xml file designed for organizations that are running SAP ITS mobile app(s) on Zebra Android devices. The standard Config.xml file also is included in the package, and can be activated using steps in the config-switching section below.

When migrating SAP apps from Windows Mobile/CE to Android, the most common problems relate to page-fitting and the absence of hardware function keys. To address these issues, organizations often maintain separate applications for different device-screen sizes and build HTML-based buttons to replace the missing hardware keys.

Enterprise Browser 2.0 helps address these and other migration issues.


SAP Package Features

Sound support

SAP ITSmobile applications can be configured to play a sound to indicate the success or failure of a transaction, and the EB SAP package can be configured also to play these sounds. If different sounds are desired, DOM injection can be used to play sounds stored on the device.

SAP Keyboards

EB 2.0 includes SAP-specific keyboard layouts that leverage EB's custom ButtonBar features. This helps to compensate for hardware keys missing from Android devices.

The SAP keyboard by default displays a numeric layout whenever the focus of an app is on an input field. The default layout is easily changed by editing the showKeyboard/hideKeyboard JavaScript function in the sapkeyboard.js API.

A function key layout allows SAP users to press function keys from the Software Input Panel (SIP) on demand, eliminating the need to modify the SAP application to include HTML buttons to emulate function keys. Each key on an EB keyboard can easily be configured to issue a keystroke or to run a script. For more information, see the ButtonBar Parameter guide.

Logic in the /android_sap/Sapkeyboard.js file reads the SAP keyboard config paramaters from the Config.xml file and registers for onfocus and keydown events to control keyboard pop-up behavior. It's important to ensure that the functions below are called after showing or hiding a keyboard.

//call to redraw the WebView when keyboard pops up:
metaReceiver.resizeWebviewOnButtonbarShown(); 

//call to redraw WebView when keyboard is hidden:
 metaReceiver.restoreWebviewOnButtonbarHidden(); 

Configuration Parameters

Enterprise Browser 2.0 (and newer) introduces configuration parameters that provide more control over the behavior of SAP apps.

SAP Keyboard Parameters

Keyboard visibility and custom key layouts can be controlled through parameters in the Config.xml file. See the Config.xml reference for details.

To show the SAP keyboard on every page:

<KeyboardVisibility value="alwaysOn"/>

To show keyboard on demand when an input field is in focus:


<KeyboardConfiguration>
    <KeyboardVisibility value="onDemand"/>
      <ondemand>
        <onFocus value="1"/>
      </ondemand>  
</KeyboardConfiguration> 


Display the keyboard whenever the F10 key is pressed:


<KeyboardConfiguration>
    <KeyboardVisibility value="onDemand"/>
      <ondemand>
        <onHardwarekeypress value="1"/>
        <HardwarekeyValue value="140"/>
      </ondemand>   
</KeyboardConfiguration>


Display the keyboard with F10 key OR when input field is focused:


<KeyboardConfiguration>
<KeyboardVisibility value="onDemand"/>
      <ondemand>
          <onHardwarekeypress value="1"/>
           <HardwarekeyValue value="140"/>
                    <onFocus value="1"/>
                 </ondemand>    
</KeyboardConfiguration>


Make the page re-sizable on keyboard pop-up to avoid visibility concerns:


<SIP>
  <ResizeOnButtonbar value="1"/>        
</SIP>


Set the page as re-sizable while reserving a minimum safe height for the keyboard:


<SIP>
  <ResizeOnButtonbar value="1"/>
  <ButtonBarMaxHeight value="default"/> 
</SIP>


Note: If the default SAP keyboard layout is preferred, Zebra recommends using the "default" value for the ButtonBarMaxHeight parameter (as above). If a custom layout is to be used, the value should be specified (in pixels) to match the layout height.


Page Fitting

Like all pixel-based UI elements, SAP ITSmobile UI elements look smaller on high-resolution displays than on low-res ones. A page designed to fill the screen of a 640x480 display will occupy only a portion of a modern high-res display. To compensate, apps running on Enterprise Browser 2.0 (and newer) can use the ViewPort parameter, which reads device-specific display settings into the app at runtime.

Example


<ViewPort>
  <UseWideViewPort value="1"/>
  <ViewPortWidth value="device-width"/>
  <ViewPortInitialScale value="1.0"/>
</ViewPort>


Supported meta tags:

  • UseWideViewPort - Value of "1" applies subsequent meta tags (default=0).
  • ViewPortWidth - Sets the width of the page.
  • ViewPortInitialScale - Sets the zoom level of the page when the app starts.

Possible values:

  • UseWideViewPort
    • 1 (enabled), meta tags (below) are applied
    • 0 (disabled), meta tags are NOT applied (default)
  • ViewPortWidth more info
  • ViewPortInitialScale more info
    • Accepts HTML5-spec viewport settings
    • Number corresponding to fixed initial magnification value (i.e. "1.5" = 1.5x zoom)
    • maximum-scale - caps the magnification value ("=1.0"=no zoom-in)
    • minimum-scale - sets a base magnification value ("=1.0"=no zoom-out)
    • user-scalable - Controls whether user is allowed to zoom (=yes, =no)

Note: Settings above impact all pages.

Force-fit to Screen Width

It's possible that some ITSmobile pages are wider than the viewport (visible area) area of the device, resulting in the need to scroll the screen to see all page elements and a less than ideal user experience. This problem is addressed with the <SapForceFitToScreen> parameter, which arranges horizontally aligned HTML elements vertically. When enabled, ITSmobile pages are forced to render elements within the visible horizontal region, or screen width.

NOTE: This parameter applies only to SAP ITSmobile apps, and might effect CSS styling. Parameter is disabled by default.

Confine page to screen width:


<SapForceFitToScreen value="1"/>
For additional page fitting options, see the DOM injection guide.

Customize Page UI Elements

EB 2.0 provides configuration parameters for controlling the size of UI elements on SAP pages. These settings impact all pages.

Increase button height:


<SapCustomization> 
    <SapButtonHeight value="30px"/>
</SapCustomization>


Adjust font size:


<SapCustomization>    
  <SapButtonFontSize value="10px"/>      
</SapCustomization>


Adjust a read-only text field:


<SapCustomization>     
  <MobileEditDisabledWidth value="20px"/> 
</SapCustomization>



Android Keyboard and DataWedge

The SAP package disables the Android keyboard by default, which also might prevent DataWedge from outputting acquired data as keystrokes. If DataWedge keystroke output is desired, enable Enterprise Keyboard on the device instead.

Enterprise Browser supports disabling default SIP provided by Android platforms. Disable it by setting the Config.xml file attribute as below:


<IME>
  <DisableAllIME value ="1"/>
</IME>

Prevent all keyboard pop-ups:


<IME>
  <DisableAllIME value ="1"/>
</IME>
<SIP>
  <ResizeOnButtonbar value="1"/>        
</SIP>

:::xml
<KeyboardConfiguration>
<KeyboardVisibility value="onDemand"/>
  <ondemand>
      <onHardwarekeypress value="1"/>
      <HardwarekeyValue value="140"/>
  </ondemand>   
</KeyboardConfiguration>

The first section of the Config.xml code above prevents the keyboard from automatically popping up when the focus moves to an input field and sets the page as "resizable" so it can adapt when a keyboard pops up. The second section causes the keyboard to appear when the F10 key is pressed (on certain devices).

More information:


Ending SAP Session

It's important to terminate the SAP session when quitting an Enterprise Browser app that accesses ITSmobile. EB 2.0 implements a Config.xml tag for this purpose. The SAP package by default is set to terminate an SAP session whenever Enterprise Browser is closed.

Default setting on SAP package:


<DeleteCookiesOnLaunch value="1"/>


Default setting on non-SAP package:


<DeleteCookiesOnLaunch value="0"/>



Locking Screen Orientation

EB 2.0 (and newer) can lock an EB app to a specific screen orientation (portrait or landscape). The SAP package by default sets the parameter to "Auto," which locks the app in the "natural" orientation of device (landscape on CC5000, ET55, VC80 and WT6000; portrait on all others). Screen "auto-rotation" is disabled when this parameter is used. More info.

Set screen orientation to "natural" for device:


<ScreenOrientation>
  <LockOrientation value= "Auto"/>
</ScreenOrientation>

KeyDown Actions

EB 2.0 (and newer) allows hardware keys of certain Zebra devices to be remapped to perform predefined actions or execute JavaScript code blocks residing on the device or on a server. Hardware keys are remapped in the KeyActions section of the KeyCodeMapping .xml file. See the Keycode Mapping Guide for more information.

Press F8 key to quit the app:


<KeyActions> 
    <KEYACTION  keyvalue="138" action="quit" />
</KeyActions>


Execute JavaScript on KeyDown event


<KeyActions> 
   <KEYACTION  keyvalue="139" action="runscript- zoomscript" />
</KeyActions> 



DOM Namespace

Enterprise Browser can inject one or more of its JavaScript APIs into a running ITSmobile app, providing access to virtually any feature available to any other EB app.

See the EB Config Reference for details.


Hide SystemBar

Enterprise Browser allows the System bar (also known as the Navigation bar, which contains HOME, BACK and RECENT buttons) to be hidden, maximizing screen space for apps and helping to prevent the app user from accidentally exiting. By default, the System bar is is hidden in the SAP bundle and displayed in the standard package. The parameter is configured in the app's Config.xml file. See the EB Config Reference for details.


Speech Recognition

EB 2.0 (and newer) supports the injection of speech commands into legacy SAP applications using text-to-speech (TTS) technology, allowing apps to speak to app users. Apps also can accept speech inputs via automatic speech recognition (ASR) and execute certain commands on a page, all without modifying the underlying server application. By default, TTS and ASR are disabled in the SAP package. See the Voice Guide for details.


SAP vs. Standard EB Package

The SAP and standard Enterprise Browser .apk files are identical; the differences between the two packages are contained only in their Config.xml files. For organizations with mixed deployments, Zebra recommends deploying the SAP package to all devices and pushing the standard Config.xml file to the EB installation directory of devices that require it. This is because the SAP installation delivers both SAP and standard versions of the Config.xml to the device.

Install directory:

/Android/data/com.symbol.EnterpriseBrowser/

SAP config file location:

/Android/data/com.symbol.EnterpriseBrowser/android_sap/Config.xml

Standard config file location:

/Android/data/com.symbol.EnterpriseBrowser/android_regular/Config.xml

To convert to the standard package from SAP:

  • Copy the Config.xml from android_regular to the EB install directory.

To convert to SAP from the standard package:

  • Copy the Config.xml from android_sap to the install directory.

Note: The /Android/data/com.symbol.EnterpriseBrowser/ folder can be replaced with the /%INSTALLDIR%/ substitution variable.


See Also