Note
This API has been available since API level 11.
This API has been available since API level 11.
This API carries out the application installation and provides information of the application being installed.
NA
API level 11
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'.
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:
|
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. |
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 property (in Subscription Return) of the install method for more information. |
details | Required | Object: details | Contains detailed information of the progress of installation. |
Error Code | Error Text | Error Description |
---|---|---|
-2 | parse error | Parsing of the requested parameters failed. |
-2 | id is empty | Indicates id parameter is empty. |
-2 | invalid ipkUrl | Indicates invalid path is passed for ipkUrl parameter. |
-2 | ipkUrl is empty | Indicates ipkUrl is empty. |
-2 | invalid target | Indicates invalid target parameter is passed. |
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
}'
API level 11
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'.
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:
|
Name | Required | Type | Description |
---|---|---|---|
returnVaue | Required | Boolean | Indicates the status of operation. Possible values are:
|
subscribed | Optional | 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. |
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 property (in Subscription Return) of the remove method for more information. |
details | Required | Object: details | Contains detailed information of the app removal progress. |
Error Code | Error Text | Error Description |
---|---|---|
-2 | id is empty | Indicates ID parameter is empty. |
-2 | No such id | Indicates there is no app with the provided ID. |
Example code
# luna-send -i -f luna://com.webos.appInstallService/dev/remove '{
"id":"my_first_app",
"subscribe":true
}'
API level 11
Installs an app on a device.
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". |
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. |
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. |
Error Code | Error Text | Error Description |
---|---|---|
-2 | parse error | Parsing of the requested parameters failed. |
-2 | id is empty | Indicates ID parameter is empty. |
-2 | invalid ipkUrl | Indicates invalid path is passed for ipkUrl parameter. |
-2 | invalid target | Indicates the invalid target parameter is passed. |
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
}'
Response:
{
"subscribed": true,
"returnValue": true
}
API level 11
Removes an installed app from a device.
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:
|
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. |
Name | Required | Type | Description |
---|---|---|---|
details | Required | Object: details | Contains detailed information of the progress of app removal. |
id | Required | String | ID of the app to be removed. |
statusValue | Required | Number | The current app removal status.
|
Error Code | Error Text | Error Description |
---|---|---|
-2 | id is empty | Indicates ID parameter is empty. |
-2 | No such id | Indicates there is no app with the provided ID. |
Example code
# luna-send -i -f luna://com.webos.appInstallService/remove '{"id":"com.test.app.hello","subscribe":true}'
Response:
{
"subscribed": true,
"returnValue": true
}
API level 11
Monitors the status of all installed and removed apps that are operating in the com.webos.appInstallService.
Name | Required | Type | Description |
---|---|---|---|
subscribe | Optional | Boolean | Subscribe and get notified when the status changes. Possible values are:
|
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. |
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 code
# luna-send -n 1 -f luna://com.webos.appInstallService/status '{}'
Response:
{
"subscribed": true,
"status": {
"apps": []
},
"returnValue": true
}
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. |
errorCode | Optional | Number | The error code for the failed operation. Note: Only appears during app installation. |
reason | Optional | String | Indicates the reason for the failure of the operation. |
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. |
Error Code | Error Text | Error Description |
---|---|---|
-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. |
-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. |
-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. |
0 | None | Success |
Contents