Sip

Enterprise Browser 1.8

Overview

The SIP API controls whether the default software input panel (SIP) is displayed on the Android Device.

Enabling the API

There are two ways to enable Enterprise Browser APIs:

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

Both methods are explained below.

Either way, the included files will be from: /Enterprise Browser/JavaScript Files/Enterprise Browser, a directory on the computer that contains the Enterprise Browser installation.

Include all JS API modules

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


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

This will define the EB class within the page. Note that the path for this file is relative to the current page (index.html). Any page on which the modules are required will need to have the required .js file(s) included in this fashion.

Include only the required modules

To include individual APIs, include the ebapi.js in the HTML, and then the additional required API file(s). For instance, to use the SIP API, add the following code to the HTML file(s). Again, this assumes that relevant 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.sip.js"></script>

In the code lines above, notice that ebapi.js is included first, followed by eb.sip.js, which is the SIP API for Enterprise Browser. This coding is required on each HTML page whenever an individual API will be called from that page.

Methods

disableAllIME()

Disabes all IMEs in the device. It is supported from Android Lollipop onwards.

Parameters

  • callback : CallBackHandler

Returns

Synchronous Return:

  • Void

Platforms

  • Android

Method Access:

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

hide()

Hides the default software keyboard.

Parameters

  • callback : CallBackHandler

Returns

Synchronous Return:

  • Void

Platforms

  • Android

Method Access:

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

resetToDefault()

Resets to default IME set before disabling all IMEs. It is supported from Android Lollipop onwards.

Parameters

  • callback : CallBackHandler

Returns

Synchronous Return:

  • Void

Platforms

  • Android

Method Access:

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

show()

Displays the default software keyboard on the device.

Parameters

  • callback : CallBackHandler

Returns

Synchronous Return:

  • Void

Platforms

  • Android

Method Access:

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

Remarks

Focus on calling show method

Focus on input field will not be reflected automatically when show method of SIP module is called.

Software keyboard behavior after hide method

The hide method does not permanently disable the SIP, but simply hides it until the focus returns to a text input field, which causes it to reappear.