Namespace hcap.application

hcap.application

Namespace Summary
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.
        }
    Since:
    1.20.1
    See:
    hcap.application.getServiceXml()
    hcap.application.getDefaultServiceXml()
    hcap.application.getApplicationList()
    hcap.application.launchApplication()
    hcap.property.getProperty()
  • <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.
        }
    Since:
    1.20.1
    See:
    hcap.application.getServiceXml()
    hcap.application.getDefaultServiceXml()
    hcap.application.launchApplication()
    hcap.application.destroyApplication()
    hcap.property.getProperty()
  • <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.
        }
    Since:
    1.20.1
    See:
    hcap.application.getServiceXml()
    hcap.application.getApplicationList()
    hcap.application.launchApplication()
    hcap.application.destroyApplication()
    hcap.property.getProperty()
  • <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.
        }
    Since:
    1.20.1
    See:
    hcap.application.getDefaultServiceXml()
    hcap.application.getApplicationList()
    hcap.application.launchApplication()
    hcap.application.destroyApplication()
  • <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.
        }
    Since:
    1.24.6
    See:
    hcap.application.getApplicationList()
    hcap.application.removeApplications()
    hcap.application.launchApplication()
    hcap.application.destroyApplication()
  • <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)
    Applicationidparameters
    AccuWeatheraccuweather
    Al Jazeeraaljazeera
    Amazonamazon.html
    AR Browsercom.zenith.app.arbrowser"{
        'target':string // launch url ex) 'www.lge.com'
    }"
    Arirang TVarirang.tv
    BBCbbc
    Bluetooth Sound Synccom.webos.app.btaudiostreaming
    Browsercom.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 Bridgeru.lgerp.colorbridge
    Cracklecrackle
    Cutter Pillarsru.lgerp.cutterpillars101
    Deezerdeezer
    Dek-ddek.d
    Demand 5demand5
    Doonungdoonung
    Euronewseuronews
    External Connectorcom.webos.app.externalconnector
    Filmboxcom.1596591.186066
    Gaiam TV (Yoga TV)com.4155984.174234
    GMM TVgmm.tv
    Google Mapsgooglemaps
    Gravity Ballru.lgerp.gravityball
    HBO Gocom.3298171.179786
    Huluhulu
    Icflixcom.4115297.175561
    Iran Tourismiran.tourism
    K-Browsercom.zenith.app.hbrowser"{
        'target':string // launch url ex) 'http://url.com/adc3f'
    }"
    KrobKruakao3kkk
    M Channelcom.4217698.175917
    M Thai Sportmthai.sport
    Mainstreamcom.ru.lgerp.mainstream
    MLBmlb
    Mobile Connectorcom.webos.app.mobileconnector
    Mthaimthai
    Musiccom.webos.app.music
    Nationnation
    Netflixnetflix
    NK-Browsercom.zenith.app.gbrowser"{
        'target':string // launch url ex) 'www.lge.com'
    }"
    Now TVnow.tv
    NPO153996.npouitzendinggemist
    Pandoracom.12465.12351
    PC Connectorcom.webos.app.pcconnector
    Photo & Videocom.webos.app.photovideo
    Rhapsodyrhapsody
    RTL XLrtl
    Screen Sharecom.webos.app.miracast
    SmartSharecom.webos.app.smartshare
    Spotifycom.4795741.189428
    Tankslgerp.com.tanks
    TV Hockeylgerp.com.tvhockey
    Videolandvideoland2014
    Voice TVvoice.tv
    WoW TVwow.tv
    YouTubeyoutube.leanback.v4
    Yupp TVyupptv
    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.
        }
    Since:
    1.20.1
    See:
    hcap.application.getServiceXml()
    hcap.application.getDefaultServiceXml()
    hcap.application.getApplicationList()
    hcap.application.destroyApplication()
    hcap.property.getProperty()
  • <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.
        }
    Since:
    1.24.6
    See:
    hcap.application.getApplicationList()
    hcap.application.installApplications()
    hcap.application.launchApplication()
    hcap.application.destroyApplication()