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
dev/install
Description
Installs an ipk file which exists in local repository of a device.
Note: This method is available only in developer mode (devmode). To enable devmode, call 'com.webos.service.devmode' ('setDevMode') with value 'true'.
Parameters
Name | Required | Type | Description |
---|---|---|---|
id | Required | String | ID of an app to be installed. Note: If an app is being installed with the same id, the request will be ignored. |
ipkUrl | Required | String | The path of the ipk file to be installed. Note: This must be the absolute path of the file. For example, "/media/internal/downloads/com.yourdomain.app.ipk". |
subscribe | Optional | Boolean | Subscribe and get notified when the status of installation changes. Possible values are:
|
Call Returns
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates the status of operation. Possible values are:
|
subscribed | Required | Boolean | Indicates if subscribed to get notified.
|
errorCode | Optional | Number | The error code for the failed operation. |
errorText | Optional | String | Indicates the reason for the failure of the operation. See the "API Error Codes Reference" section for details. |
Subscription Returns
Name | Required | Type | Description |
---|---|---|---|
id | Required | String | ID of the app that is being installed. |
statusValue | Required | Number | The current installation status. See the statusValue parameter (in Subscription Return) of the install method for more information. |
details | Required | Object: details | Contains detailed information of the progress of installation. |
Example
Example code
# luna-send -i -f luna://com.webos.appInstallService/dev/install '{
"id":"my_first_app",
"ipkUrl":"/media/internal/downloads/com.test.app.hello_0.0.1_all.ipk",
"subscribe":true
}'
dev/remove
Description
Removes apps from a device that are installed using dev/install method.
Note: This method is available only in developer mode (devmode). To enable devmode, call 'com.webos.service.devmode' ('setDevMode') with value 'true'.
Parameters
Name | Required | Type | Description |
---|---|---|---|
id | Required | String | ID of the app to be removed. |
subscribe | Required | Boolean | Subscribe and get notified when the app removal status changes. Possible values are:
|
Call Returns
Name | Required | Type | Description |
---|---|---|---|
returnVaue | Required | Boolean | Indicates the status of operation. Possible values are:
|
subscribed | Required | Boolean | Indicates if subscribed to get notified.
|
errorCode | Optional | Number | The error code for the failed operation. |
errorText | Optional | String | Indicates the reason for the failure of the operation. See the "API Error Codes Reference" section for details. |
Subscription Returns
Name | Required | Type | Description |
---|---|---|---|
id | Required | String | ID of the app that is being removed. |
statusValue | Required | Number | The current app removal status. See the statusValue parameter (in Subscription Return) of the install method for more information. |
details | Required | Object: details | Contains detailed information of the app removal progress. |
Example
Example code
# luna-send -i -f luna://com.webos.appInstallService/dev/remove '{
"id":"my_first_app",
"subscribe":true
}'
install
Description
Installs an app on a device.
Parameters
Name | Required | Type | Description |
---|---|---|---|
id | Required | String | ID of the app to be installed. Note: The ID must be unique. |
subscribe | Optional | Boolean | Subscribe and get notified when the installation status changes. Possible values are:
|
ipkUrl | Required | String | The path of the ipk file to be installed. Note: This must be the absolute path. 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:
|
subscribed | Required | Boolean | Indicates if subscribed to get notified.
|
errorCode | Optional | Number | The error code for the failed operation. |
errorText | Optional | String | Indicates the reason for the failure of the operation. See the "API Error Codes Reference" section for details. |
Subscription Returns
Name | Required | Type | Description |
---|---|---|---|
id | Required | String | ID of the app to be installed. |
statusValue | Required | Number | The current installation status. Possible values are:
|
details | Required | Object: details | Contains detailed information of the progress of installation. |
installDataPath | Required | String | Temporary data path that is being used during installation. |
Example
Example code
# 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
Removes an installed app from a device.
Parameters
Name | Required | Type | Description |
---|---|---|---|
id | Required | String | ID of the app to be removed. |
subscribe | Optional | Boolean | Subscribe and get notified when the app removal status changes. Possible values are:
|
Call Returns
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates the status of operation. Possible values are:
|
subscribed | Required | Boolean | Indicates if subscribed to get notified.
|
errorCode | Optional | Number | The error code for the failed operation. |
errorText | Optional | String | Indicates the reason for the failure of the operation. See the "API Error Codes Reference" section for details. |
Subscription Returns
Name | Required | Type | Description |
---|---|---|---|
id | Required | String | ID of the app to be removed. |
statusValue | Required | Number | The current app removal status. See the statusValue parameter (in Subscription Return) of the install method for more information. |
details | Required | Object: details | Contains detailed information of the progress of app removal. |
Example
Example code
# 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
Monitors 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 and get notified when the status changes. Possible values are:
|
Call Returns
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates the status of operation. Possible values are:
|
subscribed | Required | Boolean | Indicates if subscribed to get notified.
|
status | Required | Object: status | Contains the list of apps that are currently being installed and removed. |
errorCode | Optional | Number | The error code for the failed operation. |
errorText | Optional | String | Indicates the reason for the failure of the operation. See the "API Error Codes Reference" section for details. |
Subscription Returns
Name | Required | Type | Description |
---|---|---|---|
id | Required | String | ID of the app to be installed or removed. |
statusValue | Required | Number | The current app status. See the statusValue parameter (in Subscription Return) of the install method for more information. |
details | Required | Object: details | Contains detailed information of app statuses. |
installDataPath | Optional | String | Temporary data path that is being used during installation. |
Example
Example code
# luna-send -n 1 -f luna://com.webos.appInstallService/status '{}'
Response:
{
"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. |
API Error Codes Reference
Error Code | Error Text | Error Description |
---|---|---|
0 | None | Success |
-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. |
-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. |