com.webos.appInstallService

Note
This API has been available since API level 11.

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

ACG: applicationinstall.devmode
  • Added: API level 11

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

idRequiredString

ID of an app to be installed.

Note: If an app is being installed with the same id, the request will be ignored. 

ipkUrlRequiredString

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".

subscribeOptionalBoolean

Subscribe and get notified when the status of installation changes. Possible values are:

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

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 "API Error Codes Reference" section for details.

Subscription Returns

Name

Required

Type

Description

idRequiredString

ID of the app that is being installed.

statusValueRequiredNumber

The current installation status. 

See the statusValue property (in Subscription Return) of the install method for more information.

detailsRequiredObject: details

Contains detailed information of the progress of installation.

Error Codes Reference

Error Code

Error Text

Error Description

-2parse error

Parsing of the requested parameters failed.

-2id is empty

Indicates id parameter is empty.

-2invalid ipkUrl

Indicates invalid path is passed for ipkUrl parameter.

-2ipkUrl is empty

Indicates ipkUrl is empty.

-2invalid target

Indicates invalid target parameter is passed.

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

ACG: applicationinstall.devmode
  • Added: API level 11

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

idRequiredString

ID of the app to be removed.

subscribeOptionalBoolean

Subscribe and get notified when the app removal status changes. Possible values are:

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

Call Returns

Name

Required

Type

Description

returnVaueRequiredBoolean

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
subscribedOptionalBoolean

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 "API Error Codes Reference" section for details.

Subscription Returns

Name

Required

Type

Description

idRequiredString

ID of the app that is being removed.

statusValueRequiredNumber

The current app removal status.

See the statusValue property (in Subscription Return) of the remove method for more information.

detailsRequiredObject: details

Contains detailed information of the app removal progress.

Error Codes Reference

Error Code

Error Text

Error Description

-2id is empty

Indicates ID parameter is empty.

-2No such id

Indicates there is no app with the provided ID.

Example

Example code

# luna-send -i -f luna://com.webos.appInstallService/dev/remove '{
    "id":"my_first_app",
    "subscribe":true
}'

install

ACG: applicationinstall.management
  • Added: API level 11

Description

Installs an app on a device.

Parameters

Name

Required

Type

Description

idRequiredString

ID of the app to be installed.

Note: The ID must be unique. 

subscribeOptionalBoolean

Subscribe and get notified when the installation status changes. Possible values are:

  • true - Subscribed for changes.
  • false - Not subscribed.
ipkUrlRequiredString

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

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 "API Error Codes Reference" section for details.

Subscription Returns

Name

Required

Type

Description

idRequiredString

ID of the app to be installed.

statusValueRequiredNumber

The current installation status.

Possible values are:

  • 0 - Unknown
  • - Need to download ipk file
  • 7 -  Request download ipk to luna-downloadmgr
  • 8 - Download ipk file is on progressing
  • 10 - Download ipk is complete
  • 11 - Need to install ipk file
  • 12 - Request install ipk file to applicationinstallerutility
  • 13 - Installing ipk file is starting
  • 17 - Installing ipk is complete
  • 22 - Install operation is cancelled
  • 23 - Install operation is complete with error during download
  • 24 - Install operation is complete with error during installing ipk
  • 26 - appinstalld internal status. It'll be deprecated.
  • 27 - Need to install role & service files
  • 28 - Request install role & service files internally
  • 29 - Installing role & service files is complete
  • 30 - All install operations are complete successfully
  • 32 - Need to close app
  • 33 - Request close app to sam
  • 34 - App close is complete
  • 35 - Need to parse ipk file
  • 36 - Request parse ipk file internally
  • 37 - Parsing ipk file is complete
  • 256 - Need to install right object
  • 257 - Request installing right object to securitymanager
  • 258 - Installing right object is complete
  • 262 - Need to get ipk information from server
  • 263 - Request ipk information to server
  • 264 - Getting ipk information is complete
  • 265 - Need to post install done message
  • 266 - Request post install done to server
  • 267 - Posting install done is complete
  • 268 - Need to verify ipk file
  • 269 - Request verify ipk file to securitymanager
  • 270 - Verifying ipk file is complete
  • 271 - Ipk verifying with pkgverifier needed
  • 272 - Ipk verifying with pkgverifier requested
  • 273 - Ipk verifying with pkgverifier completed
detailsRequiredObject: details

Contains detailed information of the progress of installation.

Error Codes Reference

Error Code

Error Text

Error Description

-2parse error

Parsing of the requested parameters failed.

-2id is empty

Indicates ID parameter is empty.

-2invalid ipkUrl

Indicates invalid path is passed for ipkUrl parameter.

-2invalid target

Indicates the invalid target parameter is passed.

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 
}'

Response: 


  "subscribed": true, 
  "returnValue": true 
}

remove

ACG: applicationinstall.management
  • Added: API level 11

Description

Removes an installed app from a device.

Parameters

Name

Required

Type

Description

idRequiredString

ID of the app to be removed.

subscribeOptionalBoolean

Subscribe and get notified when the app removal status changes. Possible values are:

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

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 "API Error Codes Reference" section for details.

Subscription Returns

Name

Required

Type

Description

detailsRequiredObject: details

Contains detailed information of the progress of app removal.

idRequiredString

ID of the app to be removed.

statusValueRequiredNumber

The current app removal status.

  • 18 - Need to remove ipk file
  • 19 - Request remove ipk file to applicationinstallerutility
  • 21 - Removing ipk is complete
  • 25 - Remove operation is complete with error
  • 31 - All remove operations are complete successfully
  • 32 - Need to close app
  • 33 - Request close app to sam
  • 34 - App close is complete
  • 38 - Need to remove role & service files
  • 39 - Request remove role & service files internally
  • 40 - Remove role & service files is complete
  • 41 - Prepare to remove app
  • 42 - Start to remove app
  • 43 - removing data needed
  • 44 - removing data
  • 45 - removing data completed
  • 46 - removing jail requested
  • 47 - removing jail
  • 48 - removing jail completed
  • 259 - Need to uninstall right object
  • 260 - Request uninstalling right object to securitymanager
  • 261 - Uninstalling right object is complete

Error Codes Reference

Error Code

Error Text

Error Description

-2id is empty

Indicates ID parameter is empty.

-2No such id

Indicates there is no app with the provided ID.

Example

Example code

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

Response: 


   "subscribed": true, 
    "returnValue": true 
}

status

ACG: applicationinstall.management
  • Added: API level 11

Description

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

Parameters

Name

Required

Type

Description

subscribeOptionalBoolean

Subscribe and get notified when the status changes. Possible values are:

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

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

Contains the list of apps that are currently being installed and removed.

errorCodeOptionalNumber

The error code for the failed operation.

errorTextOptionalString

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

Subscription Returns

Name

Required

Type

Description

idRequiredString

ID of the app to be installed or removed.

statusValueRequiredNumber

The current app status. 

See the statusValue parameter (in Subscription Return) of the install method for more information.

detailsRequiredObject: details

Contains detailed information of app statuses.

installDataPathOptionalString

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

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.

errorCodeOptionalNumber

The error code for the failed operation.

Note: Only appears during app installation.

reasonOptionalString

Indicates the reason for the failure of the operation.

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.

API Error Codes Reference

Error Code

Error Text

Error Description

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

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

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

0None

Success

Contents