Note
This API has been available since API level 11.
This API has been available since API level 11.
Internal system service for handling web-based (HTML) applications.
The Web App Manager (WAM) is a component responsible for web application management in webOS platform. The Application Manager (SAM) sends a request to manage web applications to WAM.
WAM handles basic routines such as launching, closing apps as well as the following features of web applications.
NA
API level 11
Clears the browsing data of a specific type.
Name | Required | Type | Description |
---|---|---|---|
types | Optional | String array | Indicates the type of the browsing data to be deleted. Possible values are:
Note: If no value is provided, by default, the method deletes all browsing data. |
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates the status of the operation. Possible values are:
|
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" section of this method for details. |
Error Code | Error Text | Error Description |
---|---|---|
3000 | Empty array is not allowed. | Occurs because value of array type for "types" parameter is not specified. It means that the array is defined but the length is 0. |
3001 | Invalid value (Only allowed for string type) | Occurs because data type of "types" parameter is wrong. Only string array is possible. |
3002 | Unknown data: [wrong value] | Occurs because value of "types" parameter is unknown data. Refer to possible values specified in the parameter section. |
Example: Clear all browsing data
- Using the "all" value for the "types" parameter
# luna-send -n 1 luna://com.webos.service.webappmanager/clearBrowsingData '{"types":["all"]}'
Response:
{
"returnValue": true
}
- Without specifying the "types" parameter
# luna-send -n 1 luna://com.webos.service.webappmanager/clearBrowsingData '{}'
Response:
{
"returnValue": true
}
Example: Clear specific browsing data
- Clears localstorage type browsing data
# luna-send -n 1 luna://com.webos.service.webappmanager/clearBrowsingData '{"types":["localStorage"]}'
Response:
{
"returnValue": true
}
- Clears localstorage and cache types of browsing data
# luna-send -n 1 luna://com.webos.service.webappmanager/clearBrowsingData '{"types":["cache", "localStorage"]}'
Response:
{
"returnValue": true
}
API level 11
Closes all the currently running applications.
None
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates the status of the operation. Possible values are:
|
Example code
# luna-send -n 1 luna://com.webos.service.webappmanager/closeAllApps '{}'
API level 11
Gets the size of the current WebProcess.
None
Name | Required | Type | Description |
---|---|---|---|
WebProcesses | Required | Object array: WebProcesses | Indicates the list of apps which the process is running. |
returnValue | Required | Boolean | Indicates the status of the operation. Possible values are:
|
Example 2: With instanceId as a part of the returns
# luna-send -n 1 luna://com.webos.service.webappmanager/getWebProcessSize '{}'
Response:
{
"WebProcesses":[
{
"pid":"279",
"runningApps":[
{
"id":"com.webos.app.home",
"instanceId":"410e31c2-6b50-49e7-b63d-ba327fb94baf0"
}
],
"tileSize":0,
"webProcessSize":"98024 kB"
},
{
"pid":"306",
"runningApps":[
{
"id":"bareapp",
"instanceId":"668fef68-38fc-4b01-b681-0a06fe466bae0"
}
],
"tileSize":0,
"webProcessSize":"77632 kB"
}
],
"returnValue":true
}
API level 12
Kills all the windows owned by the specified app.
Note: The method is intended to be used by SAM if necessary.
Name | Required | Type | Description |
---|---|---|---|
appId | Required | String | Indicates the ID of app to kill. |
instanceId | Required | String | Indicates the instance ID of the app to kill. |
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates the status of the operation. Possible values are:
|
errorCode | Optional | Number | The error code for the failed operation. |
errorText | Optional | String | Indicates the reason for the failure of the operation. |
appId | Optional | String | Indicates the ID of the killed app. |
instanceId | Optional | String | Indicates the instance ID of the killed app. |
Example code
# luna-send -n 1 luna://com.webos.service.webappmanager/killApp '{
"appId":"bareapp",
"instanceId":"9a3b4236-3bf5-42bd-b32e-707211f716ac0"
}'
Response:
{
"appId": "bareapp",
"instanceId": "9a3b4236-3bf5-42bd-b32e-707211f716ac0",
"returnValue": true
}
API level 11
Launches an application by the app ID.
Note: This is the major function used by the SAM to request for launching an application.
Name | Required | Type | Description |
---|---|---|---|
appDesc | Required | String | Indicates the JSON object containing the appinfo.json parameters determined by the SAM. |
parameters | Optional | String | Indicates the JSON object containing the parameters to pass to the app. |
launchingAppId | Optional | String | Indicates the ID of the launching app. |
launchingProcId | Optional | Number | Indicates the ID of the process launching the app. |
instanceId | Required | String | Indicates the ID of the instance of the app which will be launched. Note: The instanceId is generated by the SAM for every new launch request. |
Name | Required | Type | Description |
---|---|---|---|
appId | Optional | String | Indicates the ID of the launched app. Note: The app is launched according to the properties specified in the appDesc parameter. |
procId | Optional | Number | Indicates the ID of the process assigned to the launch. |
errorCode | Optional | Number | The error code for the failed operation. |
errorText | Optional | String | Indicates the reason for the failure of the operation. |
returnValue | Required | Boolean | Indicates the status of the operation. Possible values are:
|
instanceId | Optional | String | Indicates the ID for the instance of the app that was launched. |
Example code
# luna-send -n 1 luna://com.webos.service.webappmanager/launchApp '{
"launchingAppId":"com.webos.app.home",
"appDesc":{
"defaultWindowType":"card",
"uiRevision":"2",
"systemApp":true,
"version":"1.0.1",
"vendor":"LG Electronics, Inc.",
"miniicon":"icon.png",
"hasPromotion":false,
"tileSize":"normal",
"icons":[
],
"launchPointId":"bareapp_default",
"largeIcon":"/usr/palm/applications/bareapp/icon.png",
"lockable":true,
"transparent":false,
"icon":"/usr/palm/applications/bareapp/icon.png",
"checkUpdateOnLaunch":true,
"imageForRecents":"",
"spinnerOnLaunch":true,
"handlesRelaunch":false,
"unmovable":false,
"id":"bareapp",
"inspectable":false,
"noSplashOnLaunch":false,
"privilegedJail":false,
"trustLevel":"default",
"title":"Bare App",
"deeplinkingParams":"",
"lptype":"default",
"inAppSetting":false,
"favicon":"",
"visible":true,
"accessibility":{
"supportsAudioGuidance":false
},
"folderPath":"/usr/palm/applications/bareapp",
"main":"index.html",
"removable":true,
"type":"web",
"disableBackHistoryAPI":false,
"bgImage":""
},
"appId":"bareapp",
"parameters":{
"displayAffinity":0
},
"reason":"com.webos.app.home",
"launchingProcId":"",
"instanceId":"188f99b7-1e1a-489f-8e3d-56844a7713030"
}'
Response:
{
"appId": "bareapp",
"instanceId": "188f99b7-1e1a-489f-8e3d-56844a7713030",
"returnValue": true
}
API level 12
Returns the list of applications that the Web App Manager is running.
Name | Required | Type | Description |
---|---|---|---|
subscribe | Optional | Boolean | Indicates if subscribed to get the notifications. Possible values are:
Default: false |
includeSysApps | Optional | Boolean | Includes/excludes the system applications in the running app list. Possible values are:
Default: false |
Name | Required | Type | Description |
---|---|---|---|
running | Required | String array | Indicates the array that contains the list of all running apps. Each app will be returned in the form of {"id": appId, "instanceId": instanceId, "webprocessid": weprocessid}. |
returnValue | Required | Boolean | Indicates the status of the operation. Possible values are:
|
Name | Required | Type | Description |
---|---|---|---|
running | Required | String array | Indicates the array that contains the list of all running apps. Each app will be returned in the form of {"id": appId, "instanceId": instanceId, "webprocessid": weprocessid}. |
returnValue | Required | Boolean | Indicates the status of the operation. Possible values are:
|
subscribed | Required | Boolean | Indicates if subscribed to get the notifications. Possible values are:
|
Example: Without parameters
# luna-send -n 1 luna://com.webos.service.webappmanager/listRunningApps '{}'
Response:
{
"returnValue":true,
"running":[
{
"id":"com.webos.app.home",
"instanceId":"410e31c2-6b50-49e7-b63d-ba327fb94baf0",
"webprocessid":"279"
},
{
"id":"bareapp",
"instanceId":"668fef68-38fc-4b01-b681-0a06fe466bae0",
"webprocessid":"306"
}
]
}
API level 11
Enables or disables displaying the logs with associated keys.
Name | Required | Type | Description |
---|---|---|---|
keys | Required | String | Indicates the keys to determine which log to enable. Note: This parameter will be ignored if it doesn't match with existing keys. |
value | Required | String | Indicates if the log of the specified key is shown/hidden. Possible values are:
Note: The value will be ignored when it is not "on" or "off". |
Name | Required | Type | Description |
---|---|---|---|
event | Optional | Boolean | Indicates whether event logs are shown or not. Possible values are:
|
bundleMessage | Optional | Boolean | Indicates if the bundleMessage logs are shown or not. Possible values are:
|
mouseMove | Optional | Boolean | Indicates whether mouseMove logs are shown or not.
|
returnValue | Required | Boolean | Indicates the status of the operation. Possible values are:
|
Example code
# luna-send -n 1 luna://com.webos.service.webappmanager/logControl '{
"keys":"event",
"value":"on"
}'
Response:
{
"bundleMessage":false,
"event":true,
"mouseMove":false,
"returnValue":true
}
API level 11
Pauses the web application.
Note: The method can be used by SAM to move a specified web application from foreground to background (currently, SAM uses the keep-alive feature instead of WAM).
Name | Required | Type | Description |
---|---|---|---|
instanceId | Required | String | Indicates the instance ID of the app to be paused. |
Name | Required | Type | Description |
---|---|---|---|
appId | Optional | String | Indicates the ID of the app that is paused. |
returnValue | Required | Boolean | Indicates the status of the operation. Possible values are:
|
errorCode | Optional | Number | The error code for the failed operation. |
errorText | Optional | String | Indicates the reason for the failure of the operation. |
instanceId | Optional | String | Indicates the instance ID of the app that is paused. |
Example: With instanceId
# luna-send -n 1 -f luna://com.palm.webappmanager/pauseApp '{
"instanceId":"7ca4b85d-43b2-4749-b2c3-346f6498c8590"
}'
Response:
{
"appId": "",
"returnValue": true,
"instanceId": "7ca4b85d-43b2-4749-b2c3-346f6498c8590"
}
API level 12
Returns the process ID of the launched application.
Name | Required | Type | Description |
---|---|---|---|
appId | Required | String | Indicates the ID of the launched application. |
instanceId | Required | String | Indicates the instance ID of the launched application. |
subscribe | Optional | Boolean | Indicates if subscribed for notifications. Possible values are:
Default: false |
Name | Required | Type | Description |
---|---|---|---|
id | Optional | String | Indicates the ID of the launched application. |
instanceId | Optional | String | Indicates the instance ID of the launched application. |
errorText | Optional | String | Indicates the reason for the failure of the operation. |
returnValue | Required | Boolean | Indicates the status of the operation. Possible values are:
|
webprocessid | Optional | Number | Indicates the process ID of the launched application. |
Name | Required | Type | Description |
---|---|---|---|
id | Optional | String | Indicates the ID of the launched application. |
instanceId | Optional | String | Indicates the instance ID of the launched application |
returnValue | Required | Boolean | Indicates the status of the operation. Possible values are:
|
subscribed | Optional | Boolean | Indicates if subscribed to get the notifications. Possible values are:
|
Example: With appId and instanceId
# luna-send -n 1 luna://com.webos.service.webappmanager/webProcessCreated '{
"instanceId":"de90e74a-b86b-42c8-8785-3efd927a36430",
"appId":"bareapp"
}'
Response:
{
"id": "bareapp",
"instanceId": "de90e74a-b86b-42c8-8785-3efd927a36430",
"returnValue": true,
"webprocessid": 197
}
Contains the size of the current running WebProcess.
Name | Required | Type | Description |
---|---|---|---|
pid | Optional | String | Indicates the ID of the process. |
webProcessSize | Optional | String | Indicates the size of the process in KB. |
tileSize | Optional | Number | Indicates the size of the tile in KB. |
runningApps | Optional | String array | Indicates the list of the apps which the process is running. |
Error Code | Error Text | Error Description |
---|---|---|
5000 | Incoming JSON is invalid or not completed | Occurs because the parameter is wrong. |
Contents