ApplicationPrivateData class

An ApplicationPrivateData object is a property of the Application object. It is used to access the keyset used by the application and the current broadcast channel of a broadcast-related application.

Properties

readonly Keyset keyset
The object of class Keyset, representing the user input events sent to the HbbTV application.
readonly Channel currentChannel
For a broadcast-related application, the value of the property contains the channel whose AIT is currently controlling the lifecycle of this application. If no channel is being presented, or if the application is not broadcast-related, the value of this property will be null.

Methods

Integer getFreeMem()
Lets the application developer query information about the current memory available to the application. This can be used during application development to find application memory leaks and possibly allow an application to make decisions related to its caching strategy (e.g. for images).

Returns the available memory to the application or -1 if the information is not available.

For example:

const appMgr = document.getElementById("applicationmanager");
const appObject = appMgr.getOwnerApplication(window.document);
console.log(“[APP] free mem = ” + appObject.privateData.getFreeMem() + “\n”);