Application class

The Application object is used to control an HbbTV application. It is used to show and hide the application and launch sibling applications. It is also used to control the keyset used by the application and to access the broadcast channel of a broadcast related application through the [applicationPrivateData](/references/application-management-apis/the-applicationprivatedata-class) object.

The application/oipfApplicationManager embedded object provides the getOwnerApplication() method, which returns the document’s owning application:

const appMgr = document.getElementById("applicationManager");
const appObject = appMgr.getOwnerApplication(document);

Properties

readonly ApplicationPrivateData privateData
Access the current application’s private data object, which is of type ApplicationPrivateData.

Methods

void show()
Request to make the application visible.
void hide()
Request to make the application invisible. Calling this method has no effect on the lifecycle of the application.

Note: Broadcast independent applications should not call this method. Doing so may result in only the background being visible to the user.
Application createApplication( String uri, false)
Create a new application and add it to the application tree. Calling this method does not automatically show the newly-created application. This call is asynchronous and may return before the new application is fully loaded. If the application cannot be created, this method returns null.

The second argument has no impact and should be false. This indicates that the new application will be a sibling application.

Arguments
uriThe URI of the first page of the application to be created.
void destroyApplication()
Terminate the application, detach it from the application tree, and make any resources used available to other applications. When an application is terminated no other applications are terminated.