JS API - for 0.2.18 firmware

JS API - additive information and changes for 0.2.18 firmware

Android STBEmulator additional API

Application API for Android STB Emulator

Returns result of checking the specified application for existense on current device. app_name - full package name.

boolean isInstalled(String app_name)

Example:

var exist = gSTB.isInstalled("com.infomir.stbemul");

Run application if it exists. app_name - full package name.

void startApplication(String app_name)

Example:

gSTB.startApplication("com.infomir.stbemul");

Install application with specified name from Google Play. app_name - full package name.

void installApplication(String app_name)

Example:

gSTB.installApplication("com.infomir.stbemul");

Install application from specified url. app_url - full address to apk-file of application.

void installApplicationByURL(String app_url)

Example:

gSTB.installApplicationByURL("http://mysite/apps/myApplication.apk");

Return stringified JSON array list of installed applications. Array contains application name, package name, and icons in available resolutions represented by base64 data.

String appsList()

Example:

var apps = JSON.parse(gSTB.appsList());
apps:
[
{
"name":"UHD Player",
"packageName":"com.android.gallery3d",
"image":{
"120":"data:image\/png;base64,dI..CB",
"160":"data:image\/png;base64,dI..CB",
"213":"data:image\/png;base64,dI..CB",
"240":"data:image\/png;base64,dI..CB",
"320":"data:image\/png;base64,dI..CB",
"480":"data:image\/png;base64,dI..CB"
}
}
]

Method to detect that current environment is emulator.

boolean isEmulator()

Example:

console.log('isEmulator' in gSTB);