com.webos.appInstallService

API Summary

This API carries out the application installation and provides information of the application being installed. 

Overview of the API

NA

Methods

install

Description

Used to install an app to a device.

Parameters

Name

Required

Type

Description

idRequiredString

ID of an app to be installed.

Note: The ID must exist in be unique. 

subscribeOptionalBoolean

Subscribe for notifications. Possible values are:

  • true - To enable subscribe.
  • false - To disable subscribe.
ipkUrlRequiredString

The path of an ipk file to be installed.

Note: The path must be absolute.

For example, "/media/internal/downloads/com.yourdomain.app.ipk"

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
subscribedRequiredBoolean

Indicates if subscribed to get notified.

  • true - Subscribed for changes
  • false - Not subscribed
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.

Subscription Returns

Name

Required

Type

Description

idRequiredString

ID of an app to be installed.

statusValueRequiredNumber

The current install status.

detailsRequiredObject: details

The details object indicates the detailed information of installation progress.

installDataPathRequiredString

Temporary data path that is being used during installation.

Error Codes Reference

Error Code

Error Text

Error Description

-1General error text is displayed such as "fail to extract ipk file", "fail to install service file", "unable to call ApplicationInstallerUtility" and so on.

General error during app installation request.

-2The same error text will be displayed as a system generates. The error occurs when an invalid parameter type or an invalid parameter value is passed.

Invalid parameter.

Example

luna-send -i -f luna://com.webos.appInstallService/install

'{

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

    "ipkUrl":"/media/internal/downloads/com.test.app.hello_0.0.1_all.ipk",

    "subscribe":true

}'

// Example response for a successful call:

{

    "subscribed": true,

    "returnValue": true

}

// Example response for a failed call:

{

    "subscribed": false,

    "errorCode": -2,

    "returnValue": false,

    "errorText": "Missing required key is required but it is missing"

}

remove

Description

Used to remove an installed app from a device.

Parameters

Name

Required

Type

Description

idRequiredString

ID of an app to be removed.

subscribeOptionalBoolean

Subscribe for notifications. Possible values are:

  • true - To enable subscribe
  • false - To disable subscribe

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
subscribedRequiredBoolean

Indicates if subscribed to get notified.

  • true - Subscribed for changes
  • false - Not subscribed
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.

Subscription Returns

Name

Required

Type

Description

idRequiredString

ID of an app to be removed.

statusValueRequiredNumber

The current remove status.

detailsRequiredObject: details

The details object indicates the detailed information of remove progress.

Error Codes Reference

Error Code

Error Text

Error Description

-2The same error text will be displayed as a system generates. The error occurs when an invalid parameter type or an invalid parameter value is passed.

Invalid parameter.

-7The same error text will be displayed as a system or another service generates. The error text is passed when an error occurs during removing an app.

Remove operation error during app removal.

Example

luna-send -i -f luna://com.webos.appInstallService/remove '{"id":"com.test.app.hello", "subscribe":true}'

 

// Example response for a successful call:

{

    "subscribed": true,

    "returnValue": true

}

 

// Example response for a failed call:

{

    "subscribed": false,

    "errorCode": -2,

    "returnValue": false,

    "errorText": "Missing required key is required but it is missing"

}

status

Description

Used to monitor the status of all installed and removed apps that are operating in the com.webos.appInstallService.

Parameters

Name

Required

Type

Description

subscribeOptionalBoolean

Subscribe for notifications. Possible values are:

  • true - To enable subscribe
  • false - To disable subscribe

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
subscribedRequiredBoolean

Indicates if subscribed to get notified.

  • true - Subscribed for changes
  • false - Not subscribed
statusRequiredObject: status

The status indicates all apps lists that are currently being installed and removed.

Subscription Returns

Name

Required

Type

Description

idRequiredString

ID of an app to be installed or removed.

statusValueRequiredNumber

The current status.

detailsRequiredObject: details

The details object indicates the detailed information of status.

installDataPathOptionalString

Temporary data path that is being used during installation.

Error Codes Reference

Error Code

Error Text

Error Description

-2The same error text will be displayed as a system generates. The error occurs when an invalid parameter type or an invalid parameter value is passed.

Invalid parameter.

Example

// Example response for a successful call:

luna-send -n 1 -f luna://com.webos.appInstallService/status '{}'

{

    "subscribed": true,

    "status": {

    "apps": [

            ...

            ]

    },

    "returnValue": true

}

Objects

details

The object describes the progress on all operations that are managed by the com.webos.appInstallService.

Name

Required

Type

Description

packageIdOptionalString

Package ID extracted from a control file within an ipk file.

verifiedOptionalBoolean

This indicates whether an app is verified by App Server or not. If this is false, an app is to be installed internally such as a secure developer mode.

progressOptionalNumber

The download progress of an ipk file from 0 to 100.

installBasePathOptionalString

The base path where an app is installed.

stateOptionalString

State of the requested progress.

updateOptionalBoolean

This indicates whether the operation is to update an app or not when installing an app.

clientOptionalString

Client who calls the operation request.

status

The object contains all operations' status that is managed by the com.webos.appInstallService.

Name

Required

Type

Description

appsRequiredObject array: details

The details object indicates the detailed information of all operation progress.

Contents