Namespace hcap.application
hcap.application
- Defined in: hcap-1.24.6.5901.js
| Constructor Attributes | Constructor Name and Description |
|---|---|
Method Summary
Namespace Detail
hcap.application
Method Detail
-
<static> hcap.application.destroyApplication(param)Terminates the application.
This is worked only when the property "asl_mode" is "1".hcap.application.destroyApplication({ "id" : "accuweather", "onSuccess" : function() { console.log("onSuccess"); }, "onFailure" : function(f) { console.log("onFailure : errorMessage = " + f.errorMessage); } });- Parameters:
- {Object} param
- {String} param.id - application id to destroy.
- {Function} param.onSuccess [Optional] - success callback function.
param.onSuccess = function() // No Parameter. } - {Function} param.onFailure [Optional] - failure callback function.
param.onFailure = function (param) { // {String} param.errorMessage - in case of failure, this message provides the details. }
-
<static> hcap.application.getApplicationList(param)Gets the application list.
This is worked only when the property "asl_mode" is "1".hcap.application.getApplicationList({ "onSuccess" : function(s) { console.log("onSuccess : list length = " + s.list.length); for (var i = 0; i < s.list.length; i++) { console.log( "list[" + i + "].valid = " + s.list[i].valid + "list[" + i + "].title = " + s.list[i].title + "list[" + i + "].appId = " + s.list[i].appId + "list[" + i + "].deleted = " + s.list[i].deleted + "list[" + i + "].visible = " + s.list[i].visible + "list[" + i + "].version = " + s.list[i].version + "list[" + i + "].iconPath = " + s.list[i].iconPath + "list[" + i + "].reason = " + s.list[i].reason ); } }, "onFailure" : function(f) { console.log("onFailure : errorMessage = " + f.errorMessage); } });- Parameters:
- {Object} param
- {Function} param.onSuccess [Optional] - success callback function.
param.onSuccess = function (param) // {Array} param.list - application list supported by TV. // {Boolean} param.list[].valid - true if the application was installed. // {String} param.list[].title - application title. // {String} param.list[].appId - application id. // {Boolean} param.list[].deleted - true if the application was deleted. // {Boolean} param.list[].visible - true if the application can be shown at the webOS launcher. // {String} param.list[].version - application version. // {String} param.list[].iconPath - file path of icon for the application // {String} param.list[].reason - reason that the application was not installed. // param.list example - // "list" : [ // { "valid": true, "title": "Web Browser", "appId": "com.webos.app.browser", "deleted": false, "visible": false, "version": "2.0.0", "iconPath" : "/icon/browser.png", "reason" : "" }, // { "valid": true, "title": "YouTube", "appId": "youtube.leanback.v4", "deleted": false, "visible": false, "version": "1.0.17", "iconPath" : "/icon/youtube.png", "reason" : "" } // ] } - {Function} param.onFailure [Optional] - failure callback function.
param.onFailure = function (param) { // {String} param.errorMessage - in case of failure, this message provides the details. }
- {Function} param.onSuccess [Optional] - success callback function.
-
<static> hcap.application.getDefaultServiceXml(param)Gets the Default LG Service XML Contents for restoring preloaded application list.
This is worked only when the property "asl_mode" is "1".hcap.application.getDefaultServiceXml({ "onSuccess" : function(s) { console.log("onSuccess : service xml = " + s.contents); }, "onFailure" : function(f) { console.log("onFailure : errorMessage = " + f.errorMessage); } });- Parameters:
- {Object} param
- {Function} param.onSuccess [Optional] - success callback function.
param.onSuccess = function (param) { // {String} param.contents - default LG Service XML Contents. } - {Function} param.onFailure [Optional] - failure callback function.
param.onFailure = function (param) { // {String} param.errorMessage - in case of failure, this message provides the details. }
- {Function} param.onSuccess [Optional] - success callback function.
-
<static> hcap.application.getServiceXml(param)Gets the LG Service XML Contents.
hcap.application.getServiceXml({ "onSuccess" : function(s) { console.log("onSuccess : service xml = " + s.contents); }, "onFailure" : function(f) { console.log("onFailure : errorMessage = " + f.errorMessage); } });- Parameters:
- {Object} param
- {Function} param.onSuccess [Optional] - success callback function.
param.onSuccess = function (param) { // {String} param.contents - current LG Service XML Contents. } - {Function} param.onFailure [Optional] - failure callback function.
param.onFailure = function (param) { // {String} param.errorMessage - in case of failure, this message provides the details. }
- {Function} param.onSuccess [Optional] - success callback function.
-
<static> hcap.application.installApplications(param)Install the applications.
hcap.application.installApplications({ "AppList" : ["com.ru.lgerp.mainstream", "ru.lgerp.gravityball"], "onSuccess" : function() { console.log("onSuccess"); }, "onFailure" : function(f) { console.log("onFailure : errorMessage = " + f.errorMessage); } });- Parameters:
- {Object} param
- {Array} param.AppList [Required] - {String} applications id to install.
- {Function} param.onSuccess [Optional] - success callback function.
param.onSuccess = function() // No Parameter. } - {Function} param.onFailure [Optional] - failure callback function.
param.onFailure = function (param) { // {String} param.errorMessage - in case of failure, this message provides the details. }
-
<static> hcap.application.launchApplication(param)Launches a application.
This is worked only when the property "asl_mode" is "1".
Following table specifies applications, their ids and parameters. (Supported applications are different according to TV model, but App IDs of applications should be same)
Application id parameters AccuWeather accuweather Al Jazeera aljazeera Amazon amazon.html AR Browser com.zenith.app.arbrowser "{
'target':string // launch url ex) 'www.lge.com'
}"Arirang TV arirang.tv BBC bbc Bluetooth Sound Sync com.webos.app.btaudiostreaming Browser com.webos.app.browser "{'params':{
'target':string, // url string. default is empty. ex) 'www.lge.com'
'fullMode':string, // full mode. default is 'false'. 'true' : full page mode, 'false' : general web browser mode
'newtab':string // default is 'true'. 'true' : new page is loaded on the new tab, 'false' : new page is loaded on the current tab.
}}"Color Bridge ru.lgerp.colorbridge Crackle crackle Cutter Pillars ru.lgerp.cutterpillars101 Deezer deezer Dek-d dek.d Demand 5 demand5 Doonung doonung Euronews euronews External Connector com.webos.app.externalconnector Filmbox com.1596591.186066 Gaiam TV (Yoga TV) com.4155984.174234 GMM TV gmm.tv Google Maps googlemaps Gravity Ball ru.lgerp.gravityball HBO Go com.3298171.179786 Hulu hulu Icflix com.4115297.175561 Iran Tourism iran.tourism K-Browser com.zenith.app.hbrowser "{
'target':string // launch url ex) 'http://url.com/adc3f'
}"KrobKruakao3 kkk M Channel com.4217698.175917 M Thai Sport mthai.sport Mainstream com.ru.lgerp.mainstream MLB mlb Mobile Connector com.webos.app.mobileconnector Mthai mthai Music com.webos.app.music Nation nation Netflix netflix NK-Browser com.zenith.app.gbrowser "{
'target':string // launch url ex) 'www.lge.com'
}"Now TV now.tv NPO 153996.npouitzendinggemist Pandora com.12465.12351 PC Connector com.webos.app.pcconnector Photo & Video com.webos.app.photovideo Rhapsody rhapsody RTL XL rtl Screen Share com.webos.app.miracast SmartShare com.webos.app.smartshare Spotify com.4795741.189428 Tanks lgerp.com.tanks TV Hockey lgerp.com.tvhockey Videoland videoland2014 Voice TV voice.tv WoW TV wow.tv YouTube youtube.leanback.v4 Yupp TV yupptv hcap.application.launchApplication({ "id" : "com.zenith.app.gbrowser", // NK-Browser "parameters" : "{ 'target':'http://www.lge.com' }", "onSuccess" : function() { console.log("onSuccess"); }, "onFailure" : function(f) { console.log("onFailure : errorMessage = " + f.errorMessage); } });- Parameters:
- {Object} param
- {String} param.id - application id to launch.
- {String} param.parameters [Optional] - parameters in JSON type string for the application to be launched.
- {Function} param.onSuccess [Optional] - success callback function.
param.onSuccess = function() // No Parameter. } - {Function} param.onFailure [Optional] - failure callback function.
param.onFailure = function (param) { // {String} param.errorMessage - in case of failure, this message provides the details. }
-
<static> hcap.application.removeApplications(param)Uninstall the applications.
hcap.application.removeApplications({ "AppList" : ["com.ru.lgerp.mainstream", "ru.lgerp.gravityball"], "onSuccess" : function() { console.log("onSuccess"); }, "onFailure" : function(f) { console.log("onFailure : errorMessage = " + f.errorMessage); } });- Parameters:
- {Object} param
- {Array} param.AppList [Required] - {String} applications id to uninstall.
- {Function} param.onSuccess [Optional] - success callback function.
param.onSuccess = function() // No Parameter. } - {Function} param.onFailure [Optional] - failure callback function.
param.onFailure = function (param) { // {String} param.errorMessage - in case of failure, this message provides the details. }