com.webos.appInstallService

API Summary

This API carries out the request on application installation and provides application information that is being installed. 

Overview of the API

(click to expand)

See Summary.


Open All


install

Description

Used to install an app to a device.

Parameters

Name

Required

Type

Description

id Required String

ID of an app to be installed.

Note: The ID must exist in be unique. 

subscribe Optional Boolean

Subscribe for notifications. Possible values are:

  • true - To enable subscribe.
  • false - To disable subscribe.
ipkUrl Required String

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

returnValue Required Boolean

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
subscribed Required Boolean

Indicates if subscribed to get notified.

  • true - Subscribed for changes
  • false - Not subscribed
errorCode Optional Number

The error code for the failed operation.

errorText Optional String

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

id Required String

ID of an app to be installed.

statusValue Required Number

The current install status.

details Required Object: details

The details object indicates the detailed information of installation progress.

installDataPath Required String

Temporary data path that is being used during installation.

Error References

Error Code

Error Text

Error Description

-1 General 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.

-2 The 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

id Required String

ID of an app to be removed.

subscribe Optional Boolean

Subscribe for notifications. Possible values are:

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

Call Returns

Name

Required

Type

Description

returnValue Required Boolean

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
subscribed Required Boolean

Indicates if subscribed to get notified.

  • true - Subscribed for changes
  • false - Not subscribed
errorCode Optional Number

The error code for the failed operation.

errorText Optional String

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

id Required String

ID of an app to be removed.

statusValue Required Number

The current remove status.

details Required Object: details

The details object indicates the detailed information of remove progress.

Error References

Error Code

Error Text

Error Description

-2 The 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.

-7 The 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

subscribe Optional Boolean

Subscribe for notifications. Possible values are:

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

Call Returns

Name

Required

Type

Description

returnValue Required Boolean

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
subscribed Required Boolean

Indicates if subscribed to get notified.

  • true - Subscribed for changes
  • false - Not subscribed
status Required Object: status

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

Subscription Returns

Name

Required

Type

Description

id Required String

ID of an app to be installed or removed.

statusValue Required Number

The current status. See the Status Values for more information.

details Required Object: details

The details object indicates the detailed information of status.

installDataPath Optional String

Temporary data path that is being used during installation.

Error References

Error Code

Error Text

Error Description

-2 The 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

packageId Optional String

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

verified Optional Boolean

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.

progress Optional Number

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

installBasePath Optional String

The base path where an app is installed.

state Optional String

State of the requested progress.

update Optional Boolean

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

client Optional String

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

apps Required Object array: details

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


Except as noted, this content is licensed under Creative Commons Attribution 4.0 and sample code is licensed under Apache License 2.0.