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.
Enterprise Browser 2.0 (and newer) includes an installation package (
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 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.
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
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
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();
Enterprise Browser 2.0 (and newer) introduces configuration parameters that provide more control over the behavior of SAP apps.
Keyboard visibility and custom key layouts can be controlled through parameters in the
Config.xml file. See the Config.xml reference for details.
<KeyboardConfiguration> <KeyboardVisibility value="onDemand"/> <ondemand> <onFocus value="1"/> </ondemand> </KeyboardConfiguration>
<KeyboardConfiguration> <KeyboardVisibility value="onDemand"/> <ondemand> <onHardwarekeypress value="1"/> <HardwarekeyValue value="140"/> </ondemand> </KeyboardConfiguration>
<KeyboardConfiguration> <KeyboardVisibility value="onDemand"/> <ondemand> <onHardwarekeypress value="1"/> <HardwarekeyValue value="140"/> <onFocus value="1"/> </ondemand> </KeyboardConfiguration>
<SIP> <ResizeOnButtonbar value="1"/> </SIP>
<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.
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.
<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.
- 1 (enabled), meta tags (below) are applied
- 0 (disabled), meta tags are NOT applied (default)
- ViewPortWidth more info
- Accepts HTML5-spec viewport settings
- Number of CSS pixels (i.e. 600) at 100% scale
- device-width - sets page width to match that of device
- 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.
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.
For additional page fitting options, see the DOM injection guide.
EB 2.0 provides configuration parameters for controlling the size of UI elements on SAP pages. These settings impact all pages.
<SapCustomization> <SapButtonHeight value="30px"/> </SapCustomization>
<SapCustomization> <SapButtonFontSize value="10px"/> </SapCustomization>
<SapCustomization> <MobileEditDisabledWidth value="20px"/> </SapCustomization>
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>
<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).
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.
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.
<ScreenOrientation> <LockOrientation value= "Auto"/> </ScreenOrientation>
.xml file. See the Keycode Mapping Guide for more information.
<KeyActions> <KEYACTION keyvalue="138" action="quit" /> </KeyActions>
<KeyActions> <KEYACTION keyvalue="139" action="runscript- zoomscript" /> </KeyActions>
See the EB Config Reference for details.
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.
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.
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.
To convert to the standard package from SAP:
- Copy the
android_regularto the EB install directory.
To convert to SAP from the standard package:
- Copy the
android_sapto the install directory.
/Android/data/com.symbol.EnterpriseBrowser/ folder can be replaced with the
/%INSTALLDIR%/ substitution variable.