com.webos.service.applicationmanager

API Summary

Provides the methods for managing application life cycle, application information, LaunchPoint list.

Overview of the API

NA

    Methods

    closeByAppId

    Description

    The closeByAppId method closes an application by appId in the system manager.

    Parameters

    Name

    Required

    Type

    Description

    idRequiredString

    The application ID to be closed.

    preloadOnlyOptionalBoolean

    If it is set to true, the target app will be closed only when it is "preload" status.

    NOTE: This parameter is only for preloadmanager. Other services or apps should not use this parameter.

    reasonOptionalString

    The reason why this app is closed. Subscribers who are watching app status will get the reason.

    NOTE: This parameter is only for reserved caller such as surfacemanager. Other services or apps should not use this parameter.

    letAppHandleOptionalBoolean

    If it is set to true, the target app will be paused instead of being closed. At the time, Platform does not close the target app by force. The app will decide its own life state to stay on foreground or go background.

    NOTE: This parameter is only for surfacemanager. Other services or apps should not use this parameter.

    Call Returns

    Name

    Required

    Type

    Description

    returnValueRequiredBoolean

    Indicates the status of operation. Possible values are:

    • true - Indicates that the operation was successful.
    • false - Indicates that the operation failed. Check "errorText" field for details.
    errorTextOptionalString

    Indicates the reason for the failure of the operation. See the "Error Codes Reference" section of this method for details.

    appIdOptionalString

    The application ID of the closed application.

    Error Codes Reference

    Error Code

    Error Text

    Error Description

    Noneinvalid parameter

    invalid parameter.

    Noneno app description

    Invalid appId is specified. That is, the 'id' parameter is empty.

    NoneNot string

    Invalid type value.

    Noneapp is not running

    Application is not running.

    Example

    # luna-send -n 1 -f luna://com.webos.service.applicationmanager/closeByAppId '{"id":"com.webos.app.test"}'

    getAppBasePath

    Description

    The getAppBasePath method gets the path of the application.

    Parameters

    Name

    Required

    Type

    Description

    appIdRequiredString

    The application ID.

    Call Returns

    Name

    Required

    Type

    Description

    returnValueRequiredBoolean

    Indicates the status of operation. Possible values are:

    • true - Indicates that the operation was successful.
    • false - Indicates that the operation failed. Check "errorText" field for details.
    appIdRequiredString

    The application ID.

    basePathRequiredString

    The application path.

    errorTextOptionalString

    Indicates the reason for the failure of the operation. See the "Error Codes Reference" section of this method for details.

    Error Codes Reference

    Error Code

    Error Text

    Error Description

    NoneNot allowed. Allow only for the info of calling app itself.

    Not allowed. Allow only for the information of calling application itself.

    NoneError parsing request:Missing required key

    Missing required key.

    NoneError parsing request:Not string

    Invalid type value.

    Example

    # luna-send -n 1 -a "bareapp" -f luna://com.webos.service.applicationmanager/getAppBasePath '{ "appId": "bareapp" }'

    getAppInfo

    Description

    The getAppInfo method gets the application information.

    Parameters

    Name

    Required

    Type

    Description

    idRequiredString

    The application ID.

    propertiesOptionalString

    The value to be extracted from appinfo.json file.

    Call Returns

    Name

    Required

    Type

    Description

    returnValueRequiredBoolean

    Indicates the status of operation. Possible values are:

    • true - Indicates that the operation was successful.
    • false - Indicates that the operation failed. Check "errorText" field for details.
    appIdRequiredString

    The application ID.

    appInfoRequiredObject: appInfo

    If the getAppinfo method succeeds, the appInfo object contains information about the application.

    errorTextOptionalString

    Indicates the reason for the failure of the operation. See the "Error Codes Reference" section of this method for details.

    Error Codes Reference

    Error Code

    Error Text

    Error Description

    NoneInvalid appId specified

    Invalid appId is specified. That is, the 'id' parameter is empty.

    Noneparameters must contain a 'id' (string)

    Parameters must contain an 'id' (string).

    NoneInvalid appId specified OR Unsupported Application Type

    Invalid appId is specified or an unsupported application type.

    Example

    Example response for a successful call:

    # luna-send -n 1 -f luna://com.webos.service.applicationmanager/getAppInfo '{"id":"com.webos.app.test"}'

    {

    "appInfo": {

    ...

    },

    "appId": "com.webos.app.test",

    "returnValue": true

    }

    getAppLifeStatus

    Description

    The getAppLifeStatus method provides application's life cycle status.

    Parameters

    Name

    Required

    Type

    Description

    subscribeRequiredBoolean

    Subscribe to the method. Possible values are:

    • true - Enable subscription
    • false - Disable subscription.

    Default value: false

    Call Returns

    Name

    Required

    Type

    Description

    returnValueRequiredBoolean

    Indicates the status of operation. Possible values are:

    • true - Indicates that the operation was successful.
    • false - Indicates that the operation failed. Check "errorText" field for details.
    subscribedRequiredBoolean

    Indicates if subscribed.

    • true - Subscribed for changes
    • false - Not subscribed
    errorTextOptionalString

    Indicates the reason for the failure of the operation. See the "Error Codes Reference" section of this method for details.

    Subscription Returns

    Name

    Required

    Type

    Description

    appIdOptionalString

    The ID of application whose status has been changed.

    statusOptionalString

    The application's status. The value will be one of the followings:

    • stop
    • launching
    • relaunching
    • foreground
    • background
    • closing
    typeOptionalString

    The application type. The value will be one of the followings:

    • web
    • native
    processIdOptionalString

    Process id of the app.

    reasonOptionalString

    In LAUNCHING/RELAUNCHING status, the reason means how the target app is launched.

    In CLOSING/STOP status, the reason means why the target app is closed.

    windowTypeOptionalString

    Window type of the app. This reason is replied only in FOREGROUND status.

    windowGroupOptionalBoolean

    Indicate that the app has window group or not. This reason is replied only in FOREGROUND status.

    windowGroupOwnerOptionalBoolean

    Indicate that the app is window group owner or not. This reason is replied only in FOREGROUND status.

    windowGroupOwnerIdOptionalString

    Indicate who is window group owner of the app. This reason is replied only in FOREGROUND status.

    backgroundStatusOptionalString

    Indicate whether the app is preloaded or not. This reason is replied only in BACKGROUND status.

    Error Codes Reference

    Error Code

    Error Text

    Error Description

    Nonesubscription is needed

    "subscribe": true parameter is needed.

    Example

    Example response for a successful call:

    AppLifeStatus can be subscribed by below command,

    # luna-send -i -f luna://com.webos.service.applicationmanager/getAppLifeStatus '{"subscribe":true}'

    {

    "subscribed": true,

    "returnValue": true

    }

     

    When barenativeqt is launched, outputs are shown like below.

    {
       

        "reason": "",
       

        "appId": "barenativeqt",
       

        "status": "launching",
       

        "type": "native"

    }

     

    When barenativeqt is closed, below outputs are shown.

    {
       

        "reason": "undefined",
       

        "appId": "barenativeqt",
       

        "status": "stop",
       

        "processId": "932",
       

        "type": "native"
    }

    getForegroundAppInfo

    Description

    The getForegroundAppInfo method gets the information on the foreground application.

    Parameters

    Name

    Required

    Type

    Description

    extraInfoOptionalBoolean
    • To enable extraInfo, set extraInfo to true. If it is set to true, the getForegroundAppInfo method will return array of foreground applications.
    • To disable extraInfo, set extraInfo to false.
    • The default value of extraInfo is false.
    subscribeOptionalBoolean

    Subscribe to the method. Possible values are:

    • true - Enable subscription
    • false - Disable subscription.

    Default value: false

    Call Returns

    Name

    Required

    Type

    Description

    returnValueRequiredBoolean

    returnValue will always contain true.

    appIdRequiredString

    The application ID of the application running in the foreground.

    windowIdRequiredString

    The window ID of the application running in the foreground. 

    processIdRequiredString

    The process ID of the application running in the foreground.

    foregroundAppInfoOptionalObject array: foregroundAppInfo

    If the getForegroundAppInfo method succeeds, the array of the foreground application will be returned.

    processId of foregroundAppInfo would be empty string if input parameter "extraInfo" is set to false. 

    subscribedOptionalBoolean

    Indicates if subscribed.

    • true - Subscribed for changes
    • false - Not subscribed

    Subscription Returns

    Name

    Required

    Type

    Description

    returnValueRequiredBoolean

    returnValue will always contain true.

    appIdRequiredString

    The application ID of the application running in the foreground.

    windowIdRequiredString

    The window ID of the application running in the foreground. 

    processIdRequiredString

    The process ID of the application running in the foreground.

    subscribedRequiredBoolean

    subscribed will always contain true.

    foregroundAppInfoOptionalObject array: foregroundAppInfo

    If the getForegroundAppInfo method succeeds, the array of the foreground application will be returned. 

    processId of foregroundAppInfo would be empty string if input parameter "extraInfo" is set to false. 

    Example

    Example response for a successful call:

    # luna-send -n 1 -f luna://com.webos.service.applicationmanager/getForegroundAppInfo '{}'

    {

    "appId": "bareapp",

    "returnValue": true,

    "windowId": "",

    "processId": ""

    }

     

    # luna-send -i -f luna://com.webos.service.applicationmanager/getForegroundAppInfo '{"subscribe":true}'

    {

    "appId": "bareapp",

    "subscribed": true,

    "returnValue": true,

    "windowId": "",

    "processId": ""

    }

     

    # luna-send -i -f luna://com.webos.service.applicationmanager/getForegroundAppInfo '{"subscribe":true, "extraInfo" : true}'


    {

        "subscribed": true,

        "foregroundAppInfo": [

            {

                "windowGroup": false,

                "appId": "bareapp",

                "windowType": "_WEBOS_WINDOW_TYPE_CARD",

                "params": {

                },

                "windowId": "",

                "processId": "719"

            }

        ],

        "returnValue": true

    }

    launch

    Description

    The launch method launches an application which corresponds to the given application ID. You can use this method to open your service or app. For example, user can download a content with your service in a background. When downloading a content is completed, your service needs to launch your app again.

    You can give parameter in JSON object when launching an application. This method could be called multiple times for the same application with different parameters. Application should handle these overtime requests. Generally, application is re-launched for every request.

    Parameters

    Name

    Required

    Type

    Description

    idRequiredString

    The application ID to be launched.

    paramsOptionalObject: params

    If params is used, it should contain information on the target application. You should specify correct parameters for each application. See the following parameter examples:

    • YouTube application: "params":{ "contentTarget" : "https://www.youtube.com/tv?v=9bZkp7q19f0"}
    • Today application: "params":{"type":"showRecordedList"}
    keepAliveOptionalBoolean
    • To run the application in the background, set keepAlive to true
    • To terminate the application, set keepAlive to false.
    • The default value of keepAlive is false.

    Note: Only applicable to web app. Do not use keepAlive for native app launching. An web App, which is launched with this parameter, can be killed when memory status is low or critical.

    Call Returns

    Name

    Required

    Type

    Description

    returnValueRequiredBoolean

    Indicates the status of operation. Possible values are:

    • true - Indicates that the operation was successful.
    • false - Indicates that the operation failed. Check the "errorCode" and "errorText" fields for details.
    errorCodeOptionalNumber

    The error code for the failed operation.

    errorTextOptionalString

    Indicates the reason for the failure of the operation. See the "Error Codes Reference" section of this method for details.

    Example

    // One-time call

    // Launching app without parameter

    webOS.service.request("luna://com.webos.service.applicationmanager", {

    method: "launch",

    parameters: { "id": "com.yourdomain.callee" },

    onComplete: function (inResponse) {

    var isSucceeded = inResponse.returnValue;

    if (isSucceeded){

    console.log("The app is launched");

    // To-Do something

    } else {

    console.log("Failed to launch the app");

    // To-Do something

    return;

    }

    }

    });

     

    // Launching app with parameters

    webOS.service.request("luna://com.webos.service.applicationmanager", {

    method: "launch",

    parameters: {

    "id": "com.yourdomain.callee",

    "params": {

    "customParam1": "value1",

    "customParam2": "value2"

    }

    },

    onComplete: function (inResponse) {

    var isSucceeded = inResponse.returnValue;

    if (isSucceeded){

    console.log("The app is launched");

    // To-Do something

    } else {

    console.log("Failed to launch the app");

    // To-Do something

    return;

    }

    }

    });

     

    [Luna-send command example]

    # luna-send -n 1 -f luna://com.webos.service.applicationmanager/launch '{"id":"bareapp"}'

    listApps

    Description

    The listApps method lists all of the registered applications.

    Parameters

    Name

    Required

    Type

    Description

    subscribeOptionalBoolean

    Subscribe to the method. Possible values are:

    • true - Enable subscription
    • false - Disable subscription.
    • Default value: false

    propertiesOptionalString array

    The value to be extracted from appinfo.json file.

    Call Returns

    Name

    Required

    Type

    Description

    returnValueRequiredBoolean

    returnValue will always contain true.

    appsRequiredObject array: appInfo

    If the listApps method succeeds, the array of the applications will be returned.

    subscribedOptionalBoolean

    Indicates if subscribed .

    • true - Subscribed.
    • false - Not subscribed

    Subscription Returns

    Name

    Required

    Type

    Description

    returnValueRequiredBoolean

    Indicates the status of operation. Possible values are:

    • true - Indicates that the operation was successful.
    • false - Indicates that the operation failed.
    appsRequiredObject array: appInfo

    Either this, or app is required.

    apps is returned when all apps' information has been changed by language change.

    appRequiredObject array: appInfo

    Either this, or apps is required.

    app is returned the information of an app which has been installed/updated/removed.

    subscribedRequiredBoolean

    subscribed will always contain true.

    changeOptionalString

    The reason why the app’s information has been changed. The value will be one of the followings:

    “added”

    “updated”

    “removed”

    changeReasonOptionalString

    The reason why the target app is added/removed.

    Example

    Example response for a successful call:

    This method returns information for all apps at first.

    # luna-send -i -f luna://com.webos.service.applicationmanager/listApps '{"subscribe":true}'

    {

    "subscribed": true,

    "apps": [

    {

    ....

    }

    ],

    "returnValue": true

    }

     

    When an app is update/removed/installed, the method returns only changed app's information

    {

    "subscribed": true,

    "change": "removed",

    "returnValue": true,

    "app": {

    ...

    }

    }

    listLaunchPoints

    Description

    The listLaunchPoints method gets all of the launchpoints.

    Parameters

    Name

    Required

    Type

    Description

    subscribeOptionalBoolean

    Subscribe to the method. Possible values are:

    • true - Enable subscription
    • false - Disable subscription.

    ​​Default value: false

    Call Returns

    Name

    Required

    Type

    Description

    subscribedRequiredBoolean
    • If it is subscribed, subscribed will contain true.
    • If it is not subscribed, subscribed will contain false.
    returnValueRequiredBoolean

    returnValue will always contain true.

    launchPointsRequiredObject array: launchPoints

    If the listLaunchPoints method succeeds, the array of the launchpoints will be returned.

    Subscription Returns

    Name

    Required

    Type

    Description

    subscribedRequiredString

    subscribed will always contain true.

    returnValueOptionalBoolean
    • If the listLaunchPoints method succeeds, returnValue will contain true.
    • If the listLaunchPoints method fails, returnValue will contain false. The method may fail because of one of the error conditions described in the API Error Codes Reference of this service. See the API Error Codes Reference for more information.
    launchPointsOptionalObject array: launchPoints

    If the listLaunchPoints method succeeds, the array of the launchpoints will be returned.

    launchPoints is returned when all apps' launchPoint information is changed by language change.

    If only one app's launchPoint is changed by updating/removing/installing, "id", "lptype", etc. field will be returned instead of launchPoints.

    lptypeOptionalString

    The launchpoint type: default, bookmark, group.

    idOptionalString

    The application ID of the launchpoint.

    removableOptionalString

    This indicates whether the application is removable or not.

    launchPointIdOptionalString

    The unique launchpoint ID.

    titleOptionalString

    The application title as it is shown in the Launcher and in the application window. The application title is unique, set once.

    iconOptionalString

    The image displayed for the application.

    iconColorOptionalString

    The background color for the application tile. The application tile is displayed in the Home, the Launcher, and the Recent screen.

    largeIconOptionalString

    The path of the large icon (130x130 pixels) displayed in the top left corner of the screen, when the user hovers over an application tile in the Launcher. This file path is relative to the appinfo.json file.

    appDescriptionOptionalString

    A short description for the application. The appDescription cannot exceed 60 characters.

    paramsOptionalObject array: params

    The params object contains information on the target application. You should specify correct parameters for each application.

    userDataOptionalString

    The additional data that may be used for analytical purposes. The userData will simply be logged when the user interacts with it in Launcher.

    changeOptionalString

    Change status of the launch point.

    • added
    • updated
    • removed
    positionOptionalNumber (int8_t)

    The position of the launch point. If the target launch point is added or moved, position indicates the place where the launch point is pinned.

    Example

    Example response for a successful call:

    # luna-send -n 1 -f luna://com.webos.service.applicationmanager/listLaunchPoints '{"subscribe":true}'

    {

        "subscribed": true,
     

        "launchPoints": [
        

        {
        

            "id": "bareapp",

            ...
        

        },

        

        ...
       

    ],
       

    "returnValue": true

    }

    registerNativeApp

    Deprecated

    Description

    The registerNativeApp method registers a native application. This method is called by a native application to indicate if it is ready to receive relaunch message. Each relaunch message is communicated via the subscription reply.

    NOTE: This method is deprecated in this release. Use the "registerApp" method instead.

    Parameters

    None

    Call Returns

    Name

    Required

    Type

    Description

    returnValueRequiredBoolean

    Indicates the status of operation. Possible values are:

    • true - Indicates that the operation was successful.
    • false - Indicates that the operation failed.
    messageRequiredString

    If a native application is successfully registered, message will contain registered.

    errorTextOptionalString

    Indicates the reason for the failure of the operation. See the "Error Codes Reference" section of this method for details.

    Error Codes Reference

    Error Code

    Error Text

    Error Description

    NoneService name is empty. Please use your own service ID.

    Caller's service name is empty.

    Example

    Example response for a successful call:

    # luna-send -n 1 -f luna://com.webos.service.applicationmanager/launch '{"id":"barenativeqt"}'

    {

    "returnValue": true,

    }

    # luna-send -n 1 -f -a "barenativeqt" luna://com.webos.service.applicationmanager/registerNativeApp '{}'

    {

    "returnValue": true,

    "message": "registered"

    }

    running

    Description

    The running method lists background/foreground applications and their process IDs that are running on webOS platform.

    Parameters

    Name

    Required

    Type

    Description

    subscribeOptionalBoolean

    Subscribe to the method. Possible values are:

    • true - Enable subscription
    • false - Disable subscription.

    ​​Default value: false

    Call Returns

    Name

    Required

    Type

    Description

    returnValueRequiredBoolean

    returnValue will always contain true.

    runningRequiredObject array: running

    If the running method succeeds, the array of the running applications will be returned.

    subscribedOptionalBoolean

    Indicates if subscribed.

    • true - Subscribed.
    • false - Not subscribed

    Subscription Returns

    Name

    Required

    Type

    Description

    returnValueRequiredBoolean

    returnValue will always contain true.

    runningRequiredObject array: running

    If the running method succeeds, the array of the running applications will be returned.

    subscribedOptionalBoolean

    Indicates if subscribed.

    • true - Subscribed.
    • false - Not subscribed

    Example

    Example response for a successful call:

    # luna-send -i -f luna://com.webos.service.applicationmanager/running '{"subscribe":true}'
    {
       

        "subscribed": true,
       

        "running": [
            

           {
        

                "id": "bareapp",
        

                ...
        

            }
       

        ],
       

        "returnValue": true

    }

    dev/closeByAppId

    Description

    The dev/closeByAppId method closes an application by app Id.

    Remark

    • This method is available on devmode.

    Parameters

    Name

    Required

    Type

    Description

    idRequiredString

    The application ID to be closed.

    Call Returns

    Name

    Required

    Type

    Description

    returnValueRequiredBoolean

    Indicates the status of operation. Possible values are:

    • true - Indicates that the operation was successful.
    • false - Indicates that the operation failed.  See the "Error Codes Reference" section of this method for details.
    appIdOptionalString

    The application ID of the closed application.

    Error Codes Reference

    Error Code

    Error Text

    Error Description

    Noneapp is not running

    The application that you want to close is not running.

    Noneno app description

    Passed id is invalid. That is, id parameter is empty.

    NoneNot string

    Passed value is an invalid type.

    Noneinvalid parameter

    Passed parameter is invalid.

    NoneOnly Dev app should be closed using /dev category_API

    In devmode, an application must be closed by dev/closeByAppId method.

    Example

    # luna-send -n 1 -f luna://com.webos.service.applicationmanager/dev/closeByAppId '{"id":"com.webos.app.test"}'

    dev/listApps

    Description

    The dev/listApps method lists all of the registered applications.

    Remark

    • This method is available on devmode.
    • This method works for devmode app type.

    Parameters

    Name

    Required

    Type

    Description

    subscribeOptionalString

    Subscribe to the method. Possible values are:

    • true - Enable subscription
    • false - Disable subscription.

    ​​Default value: false

    propertiesOptionalString array

    The name of properties to be extracted from appinfo.json file.

    Call Returns

    Name

    Required

    Type

    Description

    returnValueRequiredBoolean

    Indicates the status of operation. Possible values are:

    • true - Indicates that the operation was successful.
    • false - Indicates that the operation failed. See the API Error Codes Reference for more information.
    appsRequiredObject array: appInfo

    If the dev/listApps method succeeds, the array of the applications will be returned.

    subscribedOptionalBoolean
    • If it is subscribed, subscribed will contain true.
    • If it is not subscribed, subscribed will contain false.

    Subscription Returns

    Name

    Required

    Type

    Description

    returnValueRequiredBoolean

    Indicates the status of operation. Possible values are:

    • true - Indicates that the operation was successful.
    • false - Indicates that the operation failed. See the API Error Codes Reference for more information.
    appsRequiredObject array: appInfo

    Either this, or app will be returned.

    apps is returned when all apps' information has been changed by language change.

    appRequiredObject array: appInfo

    Either this, or apps will be required.

    app is returned the information of an app which has been installed/updated/removed.

    subscribedRequiredBoolean

    subscribed will always contain true.

    changeOptionalString

    The reason why the app’s information has been changed. The value will be one of the followings:

    • “added”
    • “updated”
    • “removed”
    changeReasonOptionalString

    The reason why the target app is added/removed.

    Example

    Example response for a successful call:

    This method returns information for all apps at first.

    # luna-send -i -f luna://com.webos.service.applicationmanager/dev/listApps '{"subscribe":true}'

    {

    "subscribed": true,

    "apps": [

    {

    ....

    }

    ],

    "returnValue": true

    }

     

    When an app is update/removed/installed, the method returns only changed app's information

    {

    "subscribed": true,

    "change": "removed",

    "returnValue": true,

    "app": {

    ...

    }

    }

    dev/running

    Description

    The dev/running method lists background/foreground applications and their process IDs that are running on webOS platform.

    Remark

    • This method is available on devmode.
    • This method works for devmode app type.

    Parameters

    Name

    Required

    Type

    Description

    subscribeOptionalBoolean

    Subscribe to the method. Possible values are:

    • true - Enable subscription
    • false - Disable subscription.

    ​​Default value: false

    Call Returns

    Name

    Required

    Type

    Description

    returnValueRequiredBoolean

    returnValue will always contain true.

    runningRequiredObject array: running

    If the dev/running method succeeds, the array of the running applications will be returned.

    subscribedOptionalBoolean
    • If it is subscribed, subscribed will contain true.
    • If it is not subscribed, subscribed will contain false.

    Subscription Returns

    Name

    Required

    Type

    Description

    subscribedOptionalBoolean
    • If it is subscribed, subscribed will contain true.
    • If it is not subscribed, subscribed will contain false.
    runningRequiredObject array: running

    If the dev/running method succeeds, the array of the running applications will be returned

    returnValueRequiredBoolean

    returnValue will always contain true.

    Example

    Example response for a successful call:

    # luna-send -i -f luna://com.webos.service.applicationmanager/dev/running '{"subscribe":true}'

    {

    "subscribed": true,

    "running": [

    {

    "id": "com.webos.app.test",

    "webprocessid": "",

    "defaultWindowType": "card",

    "appType": "native",

    "processid": "1176"

    }

    ],

    "returnValue": true

    }

    registerApp

    Description

    The registerApp method registers a native application. This method should be called by launched native application to indicate if it is ready to receive several events. Each event is communicated via the ls message connection and the reply will be delivered only to the app that is performing the action.

    Parameters

    None

    Call Returns

    Name

    Required

    Type

    Description

    returnValueRequiredBoolean

    Indicates the status of operation. Possible values are:

    • true - Indicates that the operation was successful.
    • false - Indicates that the operation failed. 
    eventRequiredString

    If a native application is successfully registered, event will contain registered.

    Subscription Returns

    Name

    Required

    Type

    Description

    eventRequiredString

    It indicates one of events the app should handle.

    returnValueRequiredBoolean

    Indicates the status of operation. Possible values are:

    • true - Indicates that the operation was successful.
    • false - Indicates that the operation failed. 
    parametersOptionalObject: params

    Information to be delivered to the registered app.

    reasonOptionalString

    The reason why this app is launch/closed.

    appIdOptionalString

    Id of the registered app. 

    Example

    # luna-send -i -f luna://com.webos.service.applicationmanager/registerApp '{}'

    {

    "event":"registered",

    "returnValue":true

    }

     

    //event is returned when an app status is changed.

    {

    "event":"pause",

    "reason":"keepAlive",

    "parameters":{},

    "returnValue":true

    }

    Objects

    appInfo

    The object contains information about the application.

    Name

    Required

    Type

    Description

    idRequiredString

    The application ID, e.g., \"com.newco.app.myApp\". Every application has a unique ID, created from reverse DNS naming conventions. The launcher uses the ID to uniquely identify application and displays it with the title above. The application ID is unique, set once, and cannot be changed after publishing the application.

    mainRequiredString

    The launchpoint for the application. This is a file path relative to the appinfo.json file and needs to point to an HTML file.

    titleRequiredString

    The application title as it is shown in the Launcher and in the application window. The application title is unique, set once.

    iconRequiredString

    The path of the icon image displayed for the application. This file path is relative to the appinfo.json file. The default is \"icon.png\".

    largeIconOptionalString

    The path of the large icon (130x130 pixels) displayed in the top left corner of the screen, when the user hovers over an application tile in the Launcher. This file path is relative to the appinfo.json file.

    typeRequiredString

    The application type; web or pdk.

    splashBackgroundOptionalString

    The background image to be shown while application is loading, e.g., splash-background.png.

    vendorOptionalString

    The application owner used in the launcher and deviceinfo dialogs.

    transparentOptionalBoolean

    This indicates whether the web application's background is transparent or not.

    versionOptionalString

    The application version number, in the dot-notation format, e.g., 3.0.2500.

    handlesRelaunchOptionalBoolean

    This indicates whether the application is relaunched or not when a user executes application that is already running.

    requiredMemoryOptionalNumber (int8_t)

    The memory consumption is increasing quickly while launching. OOM can occur before system (Memory Manager) try to acquire adequate memory for the application. 

    The requiredMemory describes the maximum usage of memory, in megabytes, while an application is launching. This is not same as the maximum memory usage while the application is running.

    iconColorOptionalString

    The background color for the application tile. The application tile is displayed in the Home, the Launcher, and the Recent screen.

    appDescriptionOptionalString

    A short description for the application. The appDescription cannot exceed 60 characters.

    foregroundAppInfo

    The object contains sorted foreground applications in ascending order.

    Name

    Required

    Type

    Description

    appIdRequiredString

    The application ID.

    windowIdRequiredString

    The window ID of the application running in the foreground.

    processIdRequiredString

    The process ID of the application running in the foreground.

    launchPoints

    The object contains the array of launchpoints.

    Name

    Required

    Type

    Description

    lptypeRequiredString

    The launchpoint type: default, bookmark, group.

    idRequiredString

    The application ID of the launchpoint.

    removableRequiredBoolean

    This indicates whether the application is removable or not.

    launchPointIdRequiredString

    The unique launchpoint ID.

    titleRequiredString

    The application title as it is shown in the Launcher and in the application window. The application title is unique, set once.

    iconRequiredString

    The image displayed for the application.

    iconColorRequiredString

    The background color for the application tile. The application tile is displayed in the Home, the Launcher, and the Recent screen.

    largeIconRequiredString

    The path of the large icon (130x130 pixels) displayed in the top left corner of the screen, when the user hovers over an application tile in the Launcher. This file path is relative to the appinfo.json file.

    appDescriptionRequiredString

    A short description for the application. The appDescription cannot exceed 60 characters.

    paramsOptionalObject: params

    The params object contains information on the target application. You should specify correct parameters for each application.

    userDataOptionalString

    The additional data that may be used for analytical purposes. The userData will simply be logged when the user interacts with it in Launcher.

    params

    The object contains the parameters for the target application. You should specify correct parameters for each application. As each application has different parameters, the parameters of params cannot be defined.

    running

    This object contains the array of the running applications.

    Name

    Required

    Type

    Description

    idRequiredString

    The application ID.

    processIdRequiredString

    The process ID of the application.

    webprocessidRequiredString

    The webprocess ID of the application.

    defaultWindowTypeRequiredString

    The default window type of the application.

    Used by WAM (WebAppMgr) to launch a window with a special window type setting.

    The value will be one of the followings:

    • card
    • minimal
    • overlay
    • popup
    appTypeRequiredString

    The application type.

    Contents