SignalIndicators

Enterprise Browser 5.0

Overview

The Signal API is used to notify the user of the strength of the WLAN signal. For Windows Mobile/CE, only Symbol devices are supported and it is also possible to display a small indicator showing the available signal.

Enabling the API

There are two methods of enabling the SignalIndicators API:

  • Include all ebapi modules
  • Include only the required API modules

For either of these methods, you'll need to include files from the /Enterprise Browser/JavaScript Files/Enterprise Browser directory on the computer that you installed the Enterprise Browser.

Include all API modules

To include all JS APIs, copy the ebapi-modules.js file to a location accessible by the app's files and include a reference to the JavaScript file in the app's HTML. For instance, to include the modules file in the app's index.html, copy the file to the same directory as that index.html and add the following line to the HTML's HEAD section:


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

Note: that the pathing for this file is relative to the current page.

This will define the EB class within the page. Any page you need to use the modules will need to have the .js file included in this fashion.

Include only the required modules

To include single APIs, you must first include the ebapi.js in your HTML as well as the API file you want to use. For instance, to use the SignalIndicators API, I would add the following code to my HTML file(s), assuming the API files have been copied to the same directory as the HTML.


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

The ebapi.js file is necessary for all single API inclusions.

Methods

hideIcon()

Hide the icon if it has been previously set by the 'showIcon' call.

Parameters

  • callback : CallBackHandler

Returns

Synchronous Return:

  • Void

Platforms

  • Android
  • Windows Mobile
  • Windows CE
  • Zebra Devices Only

Method Access:

  • Class Method: This method can only be accessed via the API class object.
    • EB.SignalIndicators.hideIcon()

showIcon(HASH propertyMap)

Overlays a small signal icon on top of the view indicating the remaining signal strength. This is particularly useful in full screen applications which cover the system signal level indicator.

Parameters

  • propertyMap : HASH

    The properties associated with the indicator, its position and colour.

    • left : INTEGER Default: [Top right of the screen]

      The absolute horizontal position of the indicator in pixels. This value is relative to the screen and not the view, so non-fullscreen applications should take care not to display the indicator off screen.

    • top : INTEGER Default: [Top right of the screen]

      The absolute vertical position of the indicator in pixels. Positive numbers push the icon towards the bottom of the screen. The value is relative to the screen and not the view, so non-fullscreen applications should take care not to display the indicator off screen.

    • layout : STRING Default: [Right]

      Sets the orientation of the icon, see the remarks section for illustrations.

      Possible Values :

      Constant: EB.SignalIndicators.SIGNAL_LAYOUT_LEFT
      String:left
      See the remarks section for illustrations of icon layout
      Constant: EB.SignalIndicators.SIGNAL_LAYOUT_RIGHT
      String:right
      See the remarks section for illustrations of icon layout
      Constant: EB.SignalIndicators.SIGNAL_LAYOUT_UP
      String:up
      See the remarks section for illustrations of icon layout
      Constant: EB.SignalIndicators.SIGNAL_LAYOUT_DOWN
      String:down
      See the remarks section for illustrations of icon layout
    • color : STRING Default: #000000

      The color of the icon. This value must be specified as a Hex value in the format #000000 to #FFFFFF. Alpha values are not supported, i.e. you can only use the component parts RRGGBB.

  • callback : CallBackHandler

Returns

Synchronous Return:

  • Void

Platforms

  • Android
  • Windows Mobile
  • Windows CE
  • Zebra Devices Only

Method Access:

  • Class Method: This method can only be accessed via the API class object.
    • EB.SignalIndicators.showIcon(HASH propertyMap)

stopWlanStatus()

If the signal is being retrieved via callback, by a previously invoked call to wlanStatus, this method will stop the callback from firing.

Parameters

  • callback : CallBackHandler

Returns

Synchronous Return:

  • Void

Platforms

  • Android
  • Windows Mobile

Method Access:

  • Class Method: This method can only be accessed via the API class object.
    • EB.SignalIndicators.stopWlanStatus()

wlanStatus()

Retrieve the current signal status. If a callback is provided to retrieve the signal then it will be called periodically at the specified refreshInterval. On Android, instead of being called periodically, the callback will be called when one of the below values changes.

Parameters

  • callback : CallBackHandler

Callback

Async Callback Returning Parameters: HASH

    • signalStrength : INTEGER

      The signal strength as a value between 0 and 100. Platforms: WM, CE, Android

    • essid : STRING

      The current ESSID

    • macAddress : STRING

      The WiFi MAC address

    • adapterName : STRING

      The WiFi adapter name

    • dhcpServer : STRING

      The current DHCP server's address. Always populated on Android, even on static IP configurations. Platforms: WM, CE, Android

    • dhcpStatic : STRING

      Whether the unit has a static or DHCP address. Not available on Android. Platforms: WM

    • gateway : STRING

      The current gateway IP address

    • ipAddress : STRING

      The device's IP address

    • rssi : STRING

      Signal strength in RSSI terms. Platforms: WM, CE, Android

    • subnetMask : STRING

      The current subnet mask

    • wins : STRING

      The current WINs server IP address. Not available on Android. Platforms: WM

    • deviceHostName : STRING

      Hostname of the device. Supported only on Android Platform. Platforms: Android

Returns

Synchronous Return:

  • HASH
    • signalStrength : INTEGER

      The signal strength as a value between 0 and 100. Platforms: WM, CE, Android

    • essid : STRING

      The current ESSID

    • macAddress : STRING

      The Device's MAC address

    • adapterName : STRING

      The Device's adapter name

    • dhcpServer : STRING

      The current DHCP server's address. Always populated on Android, even on static IP configurations. Platforms: WM, CE, Android

    • dhcpStatic : STRING

      Whether the unit has a static or DHCP address. Not available on Android. Platforms: WM

    • gateway : STRING

      The current gateway IP address

    • ipAddress : STRING

      The device's IP address

    • rssi : STRING

      Signal strength in RSSI terms. Platforms: WM, CE, Android

    • subnetMask : STRING

      The current subnet mask

    • wins : STRING

      The current WINs server IP address. Not available on Android Platforms: WM

Platforms

  • Android
  • Windows Mobile

Method Access:

  • Class Method: This method can only be accessed via the API class object.
    • EB.SignalIndicators.wlanStatus()

Properties

refreshInterval

Type

INTEGER

Description

A callback to retrieve the signal strength can be specified to occur periodically with the wlanStatus method. This value specifies the periodicity of the callback as well as the update frequency of the indicator icon, if shown. On Android this value is not used as the signal icon will be updated as soon as the signal strength changes.

Params

Default: 5000

Access

  • Class: This property can only be accessed via the API class object.
    • EB.SignalIndicators.refreshInterval

Platforms

  • Windows Mobile

Remarks

Icon Layout

Windows Mobile / CE and Handheld devices support the display of a small signal icon, this section explains the layout parameter which can be provided to showIcon(...).

Layout:Left

Left Layout Signal Indicator

Layout:Right

Right Layout Signal Indicator

Layout:Up

Up Layout Signal Indicator

Layout:Down

Down Layout Signal Indicator

Overlapping Indicators

The position of the signal and battery indicators should not be set to overlap

Screen Orientation

The indicator positions are absolute and so when rotating the screen you should also move the indicator positions accordingly to accommodate the new screen layout.

Devices lacking support

Due to platform limitations this API is not available on the following Zebra Technologies devices on specific platform:

  • VH10 CE 6.0
  • Omnii XT15 CE 6.0

Internet Explorer (IE) Rendering Engine

When using the this feature on a CE device using the IE engine, screen distortion may be noticed when scrolling. This is due to a limitation of the IE engine and can be worked around by any of the following options:

  • Not using debug buttons - If your app must use the IE engine, do not use debug buttons in the app.
  • If you need to use the signal or battery indicators either:
    • Don't scroll the page.
    • Don't use the signal / battery indicators
    • Use the Webkit engine.