APIs and Page Actions

BlueFletch Browser contains built-in APIs or Actions that can be used directly from your website code.

Android Namespace

The following commands are declared under the window.android namespace and can be used as follows:

FunctionDescription

android.showToast(message)

Instruct browser to show an Android toast message.

android.redirect(url)

Instruct browser to redirect to the specified URL.

android.goBack()

Instruct browser to go back one page

android.quit()

Instruct browser to close the current browser instance

EMS Namespace

The following commands/actions are declared under the window.ems namespace and can be used as follows:

FunctionDescription

ems.getCurrentSession()

returns a JSON object containing the current Launcher session.

ems.getCurrentConfig()

returns a JSON object containing the current Launcher configuration

ems.showKeyboard()

Instruct browser to bring up the soft keyboard

ems.hideKeyboard()

Instruct browser to hide the soft keyboard

ems.sendIntent(intentObject)

Instruct browser to send an Android Intent. The structure of the intentObject is based on the Custom Intent object in Launcher.

ems.setStorageItem(key, value)

Instruct browser to keep set a key-value string pair in memory

ems.getStorageItem(key)

Retrieve the value for a given key from memory that was set using setStorageItem

ems.clearStorage()

Clear all key-value pairs stored in memory from setStorageItem

ems.enterFullscreen

Instructs browser to enter into a fullscreen mode.

ems.exitFullscreen

Instructs browser to exit the fullscreen mode.

Last updated