LunaSysMgr
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Service API com.palm.applicationManager/

Public methods:

Private methods:


running

Private.

com.palm.applicationManager/running

List all the applications and their process IDs that are running in LunaSysMgr.

Syntax:

{
}

Returns:

{
"running": [
{
"id": string,
"processid": string
},
"returnValue": boolean
]
}
Parameters
runningObject array with the running applications. See fields below.
idApplication's ID.
processidProcess ID for the application.
returnValueIndicates if the call was succesful.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/running '{}'

Example response for a succesful call:

{
"running": [
{
"id": "com.palm.systemui",
"processid": "1000"
},
{
"id": "com.palm.launcher",
"processid": "1001"
},
{
"id": "com.palm.app.email",
"processid": "1002"
},
{
"id": "com.palm.app.phone",
"processid": "1003"
},
{
"id": "com.palm.app.messaging",
"processid": "1004"
},
{
"id": "com.palm.app.calendar",
"processid": "1005"
},
{
"id": "com.palm.app.photos",
"processid": "1012"
},
{
"id": "com.palm.app.musicplayer",
"processid": "1015"
},
{
"id": "com.palm.systemui",
"processid": "1051"
}
],
"returnValue": true
}


close

Private.

com.palm.applicationManager/close

Close an application in the system manager.

Syntax:

{
"processId": string
}
Parameters
processIdID of the process to close.

Returns:

{
"returnValue": boolean,
"errorText": string
}
Parameters
returnValueIndicates if the call was succesful.
errorTextDescribes the error if call was not succesful.
Note
The returnValue will be true as long as the syntax is correct, even if the process ID is not a valid one.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/close '{ "processId": "1052" }'

Example response for a succesful call:

{
"returnValue": true
}

Example response for a failed call:

{
"returnValue": false,
"errorText": "Must provide a valid processId to close"
}


getResourceInfo

Private.

com.palm.applicationManager/getResourceInfo

Get content type and appid(s) of the handler(s) for a resource.

Syntax:

{
"uri": string,
"mime": string
}
Parameters
uriResource URI. Required.
mimeMime type for the resource.

Returns:

{
"returnValue": boolean,
"uri": string,
"appIdByExtension": string,
"mimeByExtension": string,
"canStream": boolean,
"errorText": string
}
Parameters
returnValueIndicates if the call was succesful.
uriThe resource URI.
appIdByExtensionApplication ID of the handler application.
mimeByExtensionMime type for the URI.
canStreamIs the resource streamable.
errorTextDescribes the error if the call was not succesful.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/getResourceInfo '{ "uri": "file:///media/internal/downloads/pat5463489.pdf" }'

Example response for a succesful call:

{
"returnValue": true,
"uri": "file:\/\/\/media\/internal\/downloads\/pat5463489.pdf",
"appIdByExtension": "com.quickoffice.ar",
"mimeByExtension": "application\/pdf",
"canStream": false
}

Example response for a failed call:

{
"returnValue": false,
"errorText": "can't find a handler for the given uri"
}


getAppInfo

Private.

com.palm.applicationManager/getAppInfo

Get application information for a given application ID.

Syntax:

{
"appId": string
}
Parameters
appId,:The application's ID.

Returns:

{
"returnValue": boolean,
"appId": string,
"appInfo": object
"errorText": string
}
Parameters
returnValueIndicates if the call was succesful.
appIdThe application's ID.
appInfoObject containing information about the appliation.
errorTextDescription of error if call was not succesful.

Example calls:

luna-send -n 1 -f luna://com.palm.applicationManager/getAppInfo '{ "appId": "com.palm.app.browser" }'
luna-send -n 1 -f luna://com.palm.applicationManager/getAppInfo '{ "appId": "com.palm.app.musicplayer" }'

Example responses for succesful calls:

{
"returnValue": true,
"appId": "com.palm.app.browser",
"appInfo": {
"id": "com.palm.app.browser",
"main": "file:\/\/\/usr\/palm\/applications\/com.palm.app.browser\/index.html",
"version": "3.0.1",
"category": "",
"title": "Web",
"appmenu": "Web",
"vendor": "HP",
"vendorUrl": "",
"size": 0,
"icon": "\/usr\/palm\/applications\/com.palm.app.browser\/icon.png",
"removable": false,
"userInstalled": false,
"hasAccounts": false,
"universalSearch": {
"dbsearch": {
"displayName": "Bookmarks & History",
"url": "com.palm.app.browser",
"launchParam": "url",
"launchParamDbField": "url",
"displayFields": [
"title",
"url"
],
"dbQuery": [
{
"method": "search",
"params": {
"query": {
"from": "com.palm.browserbookmarks:1",
"where": [
{
"prop": "searchText",
"op": "?",
"val": "",
"collate": "primary"
}
],
"limit": 20
}
}
},
{
"method": "search",
"params": {
"query": {
"from": "com.palm.browserhistory:1",
"where": [
{
"prop": "searchText",
"op": "?",
"val": "",
"collate": "primary"
}
],
"limit": 50
}
}
}
],
"batchQuery": true
}
},
"uiRevision": 2,
"tapToShareSupported": true
}
}
{
"returnValue": true,
"appId": "com.palm.app.musicplayer",
"appInfo": {
"id": "com.palm.app.musicplayer",
"main": "file:\/\/\/usr\/palm\/applications\/com.palm.app.musicplayer\/index.html",
"version": "3.0.1",
"category": "",
"title": "Music",
"appmenu": "Music",
"vendor": "HP",
"vendorUrl": "",
"size": 0,
"icon": "\/usr\/palm\/applications\/com.palm.app.musicplayer\/icon.png",
"removable": false,
"userInstalled": false,
"hasAccounts": false,
"uiRevision": 2,
"tapToShareSupported": false
}
}

Example response for a failed call:

{
"returnValue": false,
"errorText": "Invalid appId specified: com.palm.app.photo"
}


install

Private.

com.palm.applicationManager/install

Install an application in the system manager.

Syntax:

{
"target": string,
"authToken": string,
"deviceId": string
}
Parameters
targetThe package to install. Required.
authTokenAuthorization token. Only used for remote packages.
deviceIdDevice ID. Only used for remote packages.

Returns:

{
"returnValue": boolean,
"errorText": string
}
Parameters
returnValueIndicates if the call was succesful.
errorTextDescribes the error if call was not succesful.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/install '{ "target": "/tmp/notavalidpackage" }'

Example response for a succesful call:

{
"returnValue": true
}

Example response for a failed call:

{
"returnValue": false,
"errorText": "Not a valid install target"
}


open

Public.

com.palm.applicationManager/open

Launch an application or open a resource in the system manager.

Syntax:

{
"id": string,
"target": string,
"mime": string,
"params": [ string, object ],
"authToken": object,
"deviceId": object,
"overrideHandlerAppId": string,
"fileName": string,
"subscribe": boolean
}
Parameters
idID of the application to open. Either this or target is needed.
targetA target URL. If id is not specified, this URL is opened in an appropriate application, if there is one.
mimeMime type for target.
paramsAdditional launch parameters for the application.
authTokenAuthorization token given to download manager when opening a remote file. deviceId is required with this.
deviceIdDevice ID given to download manager when opening a remote file. authToken is required with this.
overrideHandlerAppIdIf specified, this appid will be used to open a resource
fileNameFile name of target.
Setto true to receive status updates, for example when opening a remote file.

Examples:

Open browser application:

luna-send -n 1 -f luna://com.palm.applicationManager/open '{"id": "com.palm.app.browser" }'

This returns:

{
"processId": "success",
"returnValue": true
}

Open a local music file:

luna-send -n 1 -f luna://com.palm.applicationManager/open '{ "target": " /media/internal/downloads/this_is_revolution/02 - No Control - Lunar Cycle.mp3", "mime": "audio/mpa" }'

If the URL was correct, this returns:

{
"processId": "success",
"returnValue": true
}

Download and view US patent number 5,463,489 from www.pat2pdf.org:

luna-send -n 20 -f luna://com.palm.applicationManager/open '{ "target": "http://www.pat2pdf.org/patents/pat5463489.pdf", "subscribe": true }'

This returns:

{
"ticket": "8",
"result": "Download requested",
"subscribed": true,
"returnValue": false,
"errorText": ""
}
{
"returnValue": true,
"url": "http:\/\/www.pat2pdf.org\/patents\/pat5463489.pdf",
"target": "\/media\/internal\/downloads\/pat5463489_2.pdf",
"subscribed": true,
"ticket": "8"
}
{
"amountReceived": 2666,
"amountTotal": 827727,
"ticket": "8"
}
{
"amountReceived": 106922,
"amountTotal": 827727,
"ticket": "8"
}
{
"amountReceived": 223138,
"amountTotal": 827727,
"ticket": "8"
}
{
"amountReceived": 333266,
"amountTotal": 827727,
"ticket": "8"
}
{
"amountReceived": 447658,
"amountTotal": 827727,
"ticket": "8"
}
{
"amountReceived": 562050,
"amountTotal": 827727,
"ticket": "8"
}
{
"amountReceived": 666306,
"amountTotal": 827727,
"ticket": "8"
}
{
"amountReceived": 770106,
"amountTotal": 827727,
"ticket": "8"
}
{
"url": "http:\/\/www.pat2pdf.org\/patents\/pat5463489.pdf",
"sourceUrl": "http:\/\/www.pat2pdf.org\/patents\/pat5463489.pdf",
"deviceId": "",
"authToken": "",
"destTempPrefix": ".",
"destFile": "pat5463489_2.pdf",
"destPath": "\/media\/internal\/downloads\/",
"mimetype": "application\/pdf",
"amountReceived": 827727,
"amountTotal": 827727,
"canHandlePause": false,
"cookieHeader": "",
"completionStatusCode": 200,
"httpStatus": 200,
"interrupted": false,
"completed": true,
"aborted": false,
"target": "\/media\/internal\/downloads\/pat5463489_2.pdf",
"ticket": "8"
}

Example response for a failed call without target or id:

{
"returnValue": false,
"errorText": "Unable to process command. Provide a valid \"id\" or \"target\" field"
}


launch

Public.

com.palm.applicationManager/launch

Launch an application in the system manager.

This differs from open in that it JUST blindly launches the specified id.

Syntax:

{
"id": string,
"params": [ string/object array ]
}
Parameters
idThe application ID.
paramsParameters for the application.

Returns:

{
"returnValue": boolean,
"processId": string,
"errorText": string
}
Parameters
returnValueIndicates if the call was succesful.
processIdProcess ID for the launched application.
errorTextDescribes the error if call was not succesful.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/launch '{ "id": "com.palm.app.musicplayer", "params": [] }'

Example response for a succesful call:

{
"returnValue": true,
"processId": "success"
}

Example response for a failed call:

{
"returnValue": false,
"errorText": "Malformed JSON detected in payload"
}


listApps

Private.

com.palm.applicationManager/listApps

List all registered applications.

Syntax:

{
}

Returns:

{
"returnValue": boolean,
"apps": [ object array ]
}
Parameters
returnValueIndicates if the call was succesful.
appsArray that contains objects for the applications.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/listApps '{}'

Example response for a succesful call:

"returnValue": true,
"apps": [
{
"id": "com.palm.app.backup",
"main": "file:\/\/\/usr\/palm\/applications\/com.palm.app.backup\/index.html",
"version": "3.0.1",
"category": "",
"title": "Backup",
"appmenu": "Backup",
"vendor": "Palm, Inc.",
"vendorUrl": "",
"size": 0,
"icon": "\/usr\/palm\/applications\/com.palm.app.backup\/icon.png",
"removable": false,
"userInstalled": false,
"hasAccounts": false,
"uiRevision": 2,
"tapToShareSupported": false
},
...
{
"id": "com.palm.app.enyo-findapps",
"main": "file:\/\/\/media\/cryptofs\/apps\/usr\/palm\/applications\/com.palm.app.enyo-findapps\/index.html",
"version": "3.0.4100",
"category": "",
"title": "HP App Catalog",
"appmenu": "HP App Catalog",
"vendor": "Palm",
"vendorUrl": "",
"size": 0,
"icon": "\/media\/cryptofs\/apps\/usr\/palm\/applications\/com.palm.app.enyo-findapps\/icon.png",
"removable": false,
"userInstalled": false,
"hasAccounts": false,
"universalSearch": {
"search": {
"displayName": "HP App Catalog",
"url": "com.palm.app.findapps",
"launchParam": {
"common": {
"sceneType": "search",
"params": {
"type": "query",
"search": "#{searchTerms}"
}
}
}
}
},
"uiRevision": 2,
"tapToShareSupported": false
},
...
]
}

Example response for a failed call:

{
"returnValue": false
}


listPackages

Private.

com.palm.applicationManager/listPackages

List all the registered packages and their apps and service descriptions

Syntax:

{
}

Returns:

{
"returnValue": true,
"packages": [ object array ]
}
Parameters
returnValueIndicates if the call was succesful.
packagesArray that contains objects for the packages.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/listPackages '{}'

Example response for a succesful call:

{
"returnValue": true,
"packages": [
{
"id": "com.palm.app.accounts",
"version": "3.0.1",
"size": 0,
"loc_name": "Accounts",
"vendor": "HP",
"vendorUrl": "",
"icon": "\/usr\/palm\/applications\/com.palm.app.accounts\/icon.png",
"miniicon": "\/usr\/palm\/applications\/com.palm.app.accounts\/miniicon.png",
"userInstalled": false,
"apps": [
{
"id": "com.palm.app.accounts",
"main": "file:\/\/\/usr\/palm\/applications\/com.palm.app.accounts\/index.html",
"version": "3.0.1",
"category": "",
"title": "Accounts",
"appmenu": "Accounts",
"vendor": "HP",
"vendorUrl": "",
"size": 0,
"icon": "\/usr\/palm\/applications\/com.palm.app.accounts\/icon.png",
"removable": false,
"userInstalled": false,
"hasAccounts": false,
"uiRevision": 2,
"tapToShareSupported": false
}
],
"services": [
]
},
...
{
"id": "com.quickoffice.webos",
"loc_name": "Quickoffice",
"package_format_version": 2,
"vendor": "Quickoffice",
"vendorurl": "http:\/\/www.quickoffice.com\/",
"version": "2.0.761",
"size": 21037056,
"icon": "\/media\/cryptofs\/apps\/usr\/palm\/packages\/com.quickoffice.webos\/images\/qo-icon-64.png",
"userInstalled": false,
"apps": [
{
"id": "com.quickoffice.webos",
"main": "file:\/\/\/media\/cryptofs\/apps\/usr\/palm\/applications\/com.quickoffice.webos\/index.html",
"version": "2.0.761",
"category": "",
"title": "Quickoffice",
"appmenu": "Quickoffice",
"vendor": "Quickoffice",
"vendorUrl": "http:\/\/www.quickoffice.com\/",
"size": 0,
"icon": "\/media\/cryptofs\/apps\/usr\/palm\/applications\/com.quickoffice.webos\/images\/qo-icon-64.png",
"removable": false,
"userInstalled": false,
"hasAccounts": false,
"uiRevision": 2,
"tapToShareSupported": false
}
],
"services": [
]
}
]
}

Example response for a failed call:

{
"returnValue": false
}


getSizeOfApps

Private.

com.palm.applicationManager/getSizeOfApps

Get size of applications.

Syntax:

{
"includeDbSize": bool,
"appIds": [string array ]
}
Parameters
includeDbSizeIf true, application database size is calculated into the total size.
appIdsThe application IDs of the applications for which to get size.

Returns:

{
"subscribed": false,
"returnValue": true,
"errorCode": string
"<appId>": int,
"<appId>": int,
...
}
Parameters
subscribedAlways false, no subscriptions.
returnValueIndicates if the call was succesful.
errorCodeDescribes the error if call was not succesful.
<appId>The size of the corresponding application in bytes.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/getSizeOfApps '{ "includeDbSize": true, "appIds": ["com.palm.app.browser", "com.palm.app.musicplayer"] }'

Example response for a succesful call:

{
"subscribed": false,
"returnValue": true,
"com.palm.app.browser": 1134592,
"com.palm.app.musicplayer": 2727936
}

Example response for a failed call:

{
"subscribed": false,
"returnValue": false,
"errorCode": "Malformed JSON detected in payload"
}


searchApps

Private.

com.palm.applicationManager/searchApps

List apps by prefix match of the partial/whole search term provided against the keywords of each app and against the title/long name and "menu name"/short name of each app.

Syntax:

{
"keyword": string
}
Parameters
keywordKeyword to search with.

Returns:

{
"apps": [
{
"launchPoint": string
}
],
"returnValue": boolean,
"errorCode": string
}
Parameters
appsObject array, see fields below.
launchPointApplication launch point.
returnValueIndicates if the call was succesful.
errorCodeDescribes the error if call was not succesful.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/searchApps '{ "keyword": "music" }'

Example response for a succesful call:

{
"apps": [
{
"launchPoint": "com.palm.app.musicplayer_default"
},
{
"launchPoint": "com.palm.app.soundsandalerts_default"
}
],
"returnValue": true
}

Example response for a failed call:

{
"returnValue": false,
"errorCode": "Malformed JSON detected in payload"
}

ListLaunchPoints: This returns all the launchPoints


listLaunchPoints

Private.

com.palm.applicationManager/listLaunchPoints

Get all launch points.

Syntax:

{
}

Returns:

{
"returnValue": boolean,
"launchPoints": [
{
"id": string,
"version": string,
"appId": string,
"vendor": string,
"vendorUrl": string,
"size": int,
"packageId": string,
"removable": boolean,
"launchPointId": string,
"title": string,
"appmenu": string,
"icon": string
}
]
}
Parameters
returnValueIndicates if the call was succesful.
launchPointsObject array of launch points, see fields below.
idID.
versionVersion information.
appIdApplication ID.
vendorName of the vendor.
vendorUrlVendor URL.
sizeSize.
packageIdPackage ID.
removableIs package removable.
launchPointIdLaunch point ID.
titleTitle of the application
appmenuMenu title
iconPath to application icon.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/listLaunchPoints '{}'

Example response for a succesful call:

{
"returnValue": true,
"launchPoints": [
{
"id": "com.palm.app.backup",
"version": "3.0.1",
"appId": "com.palm.app.backup",
"vendor": "Palm, Inc.",
"vendorUrl": "",
"size": 0,
"packageId": "com.palm.app.backup",
"removable": false,
"launchPointId": "com.palm.app.backup_default",
"title": "Backup",
"appmenu": "Backup",
"icon": "\/usr\/palm\/applications\/com.palm.app.backup\/icon.png"
},
{
"id": "com.palm.app.location",
"version": "3.0.1",
"appId": "com.palm.app.location",
"vendor": "Palm, Inc.",
"vendorUrl": "",
"size": 0,
"packageId": "com.palm.app.location",
"removable": false,
"launchPointId": "com.palm.app.location_default",
"title": "Location Services",
"appmenu": "Location Services",
"icon": "\/usr\/palm\/applications\/com.palm.app.location\/icon.png"
},
...
{
"id": "com.palm.app.youtube",
"version": "1.0.0",
"appId": "com.palm.app.youtube",
"vendor": "HP",
"vendorUrl": "",
"size": 524288,
"packageId": "com.palm.app.youtube",
"removable": false,
"launchPointId": "com.palm.app.youtube_default",
"title": "YouTube",
"appmenu": "YouTube",
"icon": "\/media\/cryptofs\/apps\/usr\/palm\/applications\/com.palm.app.youtube\/images\/youtube-icon64.png"
}
]
}

Example response for a failed call:

{
"returnValue": boolean,
}


listDockModeLaunchPoints

Private.

com.palm.applicationManager/listDockModeLaunchPoints

List all dock mode launch points.

Syntax:

{
}

Returns:

{
"returnValue": boolean,
"launchPoints": [ object array ]
}
Parameters
returnValueIndicates if the call was succesful.
launchPointsLaunch points in an object array.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/listDockModeLaunchPoints '{}'

Example response for a succesful call:

{
"returnValue": true,
"launchPoints": [
{
"id": "com.palm.app.agendaview",
"version": "3.0.1",
"appId": "com.palm.app.agendaview",
"vendor": "Palm",
"vendorUrl": "",
"size": 0,
"packageId": "com.palm.app.agendaview",
"exhibitionMode": true,
"exhibitionModeTitle": "Agenda",
"removable": false,
"launchPointId": "com.palm.app.agendaview_default",
"title": "Agenda",
"appmenu": "Agenda",
"icon": "\/usr\/palm\/applications\/com.palm.app.agendaview\/icon-64x64.png",
"enabled": true
},
{
"id": "com.palm.app.photos",
"version": "3.0.1",
"appId": "com.palm.app.photos",
"vendor": "Palm, Inc.",
"vendorUrl": "",
"size": 0,
"packageId": "com.palm.app.photos",
"exhibitionMode": true,
"exhibitionModeTitle": "Photos",
"removable": false,
"launchPointId": "com.palm.app.photos_default",
"title": "Photos & Videos",
"appmenu": "Photos & Videos",
"icon": "\/usr\/palm\/applications\/com.palm.app.photos\/icon.png",
"enabled": true
}
]
}

Example response for a failed call:

{
"returnValue": false
}


listPendingLaunchPoints

Public.

com.palm.applicationManager/listPendingLaunchPoints

Get a list of all the launchPoints which are pending an update or a new install.

Syntax:

{
}

Returns:

{
"returnValue": boolean,
"launchPoints": [ object array ]
}
Parameters
returnValueIndicates if the call was succesful.
launchPointsPending launch points in an object array.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/listPendingLaunchPoints '{}'

Example response for a succesful call:

{
"returnValue": true,
"launchPoints": [
]
}

Example response for a failed call:

{
"returnValue": false
}


listDockPoints

Private.

com.palm.applicationManager/listDockPoints

Get the list of dock launch points.

Syntax:

{
}

Returns:

{
"returnValue": true,
"dockPoints": [ object array ]
}
Parameters
returnValueIndicates if the call was succesful.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/listDockPoints '{}'

Example response for a succesful call:

{
"returnValue": true,
"dockPoints": [
]
}

Example response for a failed call:

{
"returnValue": false
}


addDockModeLaunchPoint

Private.

com.palm.applicationManager/addDockModeLaunchPoint

Add the launchpoint represented by the passed appId to the dock mode.

Syntax:

{
"appId": string
}
Parameters
appIdThe application ID.

Returns:

{
"returnValue": boolean
}
Parameters
returnValueIndicates if the call was succesful.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/addDockModeLaunchPoint '{ "appId": "com.palm.app.musicplayer" }'

Example response for a succesful call:

{
"returnValue": true
}

Example response for a failed call:

{
"returnValue": false
}


removeDockModeLaunchPoint

Private.

com.palm.applicationManager/removeDockModeLaunchPoint

Removes a launch point represented by an application ID from the dock mode.

Syntax:

{
"appId": string
}

Returns:

{
"returnValue": boolean
}
Parameters
returnValueIndicates if the call was succesful.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/removeDockModeLaunchPoint '{ "appId": "com.palm.app.foo" }'

Example response for a succesful call:

{
"returnValue": true
}

Example response for a failed call:

{
"returnValue": false
}


rescan

Private.

com.palm.applicationManager/rescan

Rescan/load the running applications.

Syntax:

{
}

Returns:

{
"returnValue": boolean
}
Parameters
returnValueIndicates if the call was succesful.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/rescan '{}'

Example response for a succesful call:

{
"returnValue": true
}


inspect

Private.

com.palm.applicationManager/inspect

Inspect a process.

Syntax:

{
"processId": string
}

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/inspect '{ "processId": "1000" }'


addLaunchPoint

Public.

com.palm.applicationManager/addLaunchPoint

Add a Dynamic launchpoint

Syntax:

{
"id": string,
"title": string,
"appMenu": string,
"icon": string,
"params": string,
"removable": boolean
}
Parameters
idApplication ID. Required.
titleTitle for the launch point. Required.
appMenuApp menu title.
iconPath to icon. Required.
paramsParameters to pass to the application. Required.
removableIs the launch point removable.

Returns:

{
"returnValue": boolean,
"launchPointId": string,
"errorText": string
}
Parameters
returnValueIndicates if the call was succesful.
launchPointIdID for the created launch point.
errorTextDescribes the error if call was not succesful.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/addLaunchPoint '{ "id": "com.palm.app.musicplayer", "title": "musaa", "appMenu": "musamenu", "icon": "/usr/lib/luna/luna-media-shim/images/music-file-icon.png", "params": {}, "removable": true }'

Example response for a succesful call:

{
"returnValue": true,
"launchPointId": "00164209"
}

Example response for a failed call:

{
"returnValue": false,
"errorText": "Invalid arguments"
}


removeLaunchPoint

Public.

com.palm.applicationManager/removeLaunchPoint

Remove a dynamic launchpoint.

Syntax:

{
"launchPointId": string
}

Returns:

{
"returnValue": string,
"errorText": string
}
Parameters
returnValueIndicates if the call was succesful.
errorTextDescribes the error if call was not succesful.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/removeLaunchPoint '{ "launchPointId": "00294900" }'

Example response for a succesful call:

{
"returnValue": true
}

Example response for a failed call:

{
"returnValue": false,
"errorText": "launch point [00294900] not found"
}

updateLaunchPointIcon: Update a launch points icon


updateLaunchPointIcon

Public.

com.palm.applicationManager/updateLaunchPointIcon

Update a launch point's icon.

Note
Only an application can update it's own icon.

Syntax:

{
"launchPointId": string,
"icon": string
}
Parameters
launchPointIdLaunch point's ID.
iconPath to new icon for the launch point.

Returns:

{
"returnValue": boolean,
"errorText": string
}
Parameters
returnValueIndicates if the call was succesful.
errorTextDescription of the error if the call was not succesful.

Examples:

Example response for a succesful call:

{
"returnValue": true
}

Example response for a failed call:

{
"returnValue": false,
"errorText": "Unrecognized application sender"
}


launchPointChanges

Private.

com.palm.applicationManager/launchPointChanges

Subscription method to be informed when changes occur in launchPoints.

Syntax:

{
"subscribe": boolean
}
Parameters
subscribeSet to true to be to be informed when changes occur in launchPoints.

Returns:

{
"subscribed": boolean,
"returnValue": boolean,
"errorText": string
}
Parameters
subscribedTrue if subscribed.
returnValueIndicates if the call was succesful.
errorTextDescribes the error if call was not succesful.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/launchPointChanges '{ "subscribe": true }'

Example response for a succesful call:

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

Example response for a failed call:

{
"returnValue": false,
"subscribed": false,
"errorText": "Only supports subscriptions"
}

Example of a status change message when a launch point is added:

{
"id": "com.palm.app.musicplayer",
"version": "3.0.1",
"appId": "com.palm.app.musicplayer",
"vendor": "HP",
"vendorUrl": "",
"size": 0,
"packageId": "com.palm.app.musicplayer",
"removable": true,
"launchPointId": "00453104",
"title": "musaa",
"appmenu": "musaa",
"icon": "\/usr\/lib\/luna\/luna-media-shim\/images\/music-file-icon.png",
"params": {
},
"change": "added"
}


dumpMimeTable

Private.

com.palm.applicationManager/dumpMimeTable

Get the complete mime table.

Syntax:

{
}

Returns:

{
"resources": [
{
"mimeType": string,
"handlers": {
"primary": { object },
{ alternate handler objects },
...
}
},
...
],
"redirects": [
{
"url": string,
"handlers": {
"primary": { object },
{ alternate handler objects },
...
}
},
...
]
}
Parameters
resourcesObject array with objects for different mime types and their resource handlers.
mimeTypeThe mime type.
handlersObject which contains the primary handler followed by alternate handlers.
redirectsObject array with objects for different URL patterns and their redirect handlers.
urlThe URL pattern.
handlersObject which contains the primary handler followed by alternate handlers.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/dumpMimeTable '{}'

Example response for a succesful call:

{
"resources": [
{
"mimeType": "application\/cer",
"handlers": {
"primary": {
"mime": "application\/cer",
"extension": "cer",
"appId": "com.palm.app.certificate",
"streamable": false,
"index": 46,
"tag": "system-default"
}
}
},
...
{
"mimeType": "video\/quicktime",
"handlers": {
"primary": {
"mime": "video\/quicktime",
"extension": "mp4",
"appId": "com.palm.app.videoplayer",
"streamable": true,
"index": 49,
"tag": "system-default"
}
}
}
],
"redirects": [
{
"url": "^chatWith:",
"handlers": {
"primary": {
"url": "^chatWith:",
"appId": "com.palm.app.messaging",
"index": 10,
"tag": "system-default",
"schemeForm": true
}
}
},
...
{
"url": "^ypc:",
"handlers": {
"primary": {
"url": "^ypc:",
"appId": "com.palm.app.ypmobile",
"index": 34,
"tag": "system-default",
"schemeForm": true
}
}
}
]
}


addResourceHandler

Private.

com.palm.applicationManager/addResourceHandler

Syntax:

{
"appId": string,
"shouldDownload": boolean,
"mimeType": string
"extension": string
}
Parameters
appIdID of the handler application. Required.
shouldDownloadTrue if the handler application should download any remote resources. Defaults to false.
mimeTypeThe mime type that the application should handle. This or extension is required.
extensionExtension of the file type that the application should handle. This or mimeType is required.

Returns:

{
"subscribed": false,
"returnValue": true,
"errorCode": string
}
Parameters
subscribedAlways false, no subscriptions available.
returnValueIndicates if the call was succesful.
errorCodeDescription of the error if call was not succesful.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/addResourceHandler '{ "appId": "com.palm.app.musicplayer", "shouldDownload": true, "mimeType": "audio/mpa" }'

Example response for a succesful call:

{
"subscribed": false,
"returnValue": true
}

Example response for a failed call:

{
"subscribed": false,
"returnValue": false,
"errorCode": "Cannot find mime type for extension [audio\/mpa]"
}


addRedirectHandler

Private.

com.palm.applicationManager/addRedirectHandler

Add an URL redirect handler application.

Syntax:

{
"appId": string,
"urlPattern": string,
"schemeForm": boolean
}
Parameters
addIdID of the new handler application.
urlPatternThe URL pattern that the application should handle.
schemeFormSet to true if the urlPattern is an URI scheme.

Returns:

{
"subscribed": false,
"returnValue": true,
"errorCode": string
}
Parameters
subscribedAlways false, no subscriptions available.
returnValueIndicates if the call was succesful.
errorCodeDescription of the error if call was not succesful.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/addRedirectHandler '{ "appId": "com.palm.app.browser", "urlPattern": "^im:", "schemeForm": false }'

Example response for a succesful call:

{
"subscribed": false,
"returnValue": true
}

Example response for a failed call:

{
"subscribed": false,
"returnValue": false,
"errorCode": "schemeForm parameter incorrectly specified (should be a boolean value)"
}


mimeTypeForExtension

Public.

com.palm.applicationManager/mimeTypeForExtension

Get mime type for a file type extension.

Syntax:

{
"extension": string
}
Parameters
extensionFile type extension.

Returns:

{
"subscribed": false,
"returnValue": true,
"mimeType": string,
"extension": string
"errorCode": string
}
Parameters
subscribedAlways false, no subscriptions available.
returnValueIndicates if the call was succesful.
mimeTypeMime type.
extensionThe file type extension given as parameter.
errorCodeDescription of the error if call was not succesful.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/mimeTypeForExtension '{"extension": "mp3"}'

Example response for a succesful call:

{
"subscribed": false,
"returnValue": true,
"mimeType": "audio\/mpa",
"extension": "mp3"
}

Example response for a failed call:

{
"subscribed": false,
"returnValue": false,
"errorCode": "No mime mapped to this extension"
}


getHandlerForMimeType

Public.

com.palm.applicationManager/getHandlerForMimeType

Get handler application for a mime type.

Syntax:

{
"mimeType": string
}

Returns:

{
"subscribed": boolean,
"returnValue": boolean,
"mimeType": string
"appId": string
"download": boolean,
"errorCode":string
}
Parameters
subscribedAlways false, no subscriptions.
returnValueIndicates if the call was succesful.
mimeTypeThe mime type.
appIdThe handler application ID.
downloadIs a remote resource downloaded before the handler application is launched.
errorCodeDescribes the error if the call was not succesful.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/getHandlerForMimeType '{ "mimeType": "application/pdf" }'

Example response for a succesful call:

{
"subscribed": false,
"returnValue": true,
"mimeType": "application\/pdf",
"appId": "com.quickoffice.ar",
"download": true
}

Example response for a failed call:

{
"subscribed": false,
"returnValue": false,
"errorCode": "No handler mapped to this mimeType"
}


getHandlerForExtension

Public.

com.palm.applicationManager/getHandlerForExtension

Get handler application for a file type extension.

Syntax:

{
"extension": string
}

Returns:

{
"subscribed": boolean,
"returnValue": boolean,
"mimeType": string,
"appId": string,
"download": boolean,
"errorCode": string
}
Parameters
subscribedAlways false, no subscriptions.
returnValueIndicates if the call was succesful.
mimeTypeMime type for the extension.
appIdHandler application ID.
downloadIs a remote resource downloaded before the handler application is launched.
errorCodeDescribes the error if call was not succesful.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/getHandlerForExtension '{ "extension": "mp3" }'

Example response for a succesful call:

{
"subscribed": false,
"returnValue": true,
"mimeType": "audio\/mpa",
"appId": "com.palm.app.streamingmusicplayer",
"download": false
}

Example response for a failed call:

{
"subscribed": false,
"returnValue": false,
"errorCode": "No mime type mapped to extension fob"
}


getHandlerForUrl

Public.

com.palm.applicationManager/getHandlerForUrl

Get handler application for an URL.

Syntax:

{
"url": string
}

Returns:

{
}
Parameters
subscribedAlways false, no subscriptions.
returnValueIndicates if the call was succesful.
mimeTypeMime type of the resource.
appIdThe handler application ID.
downloadIs a remote resource downloaded before the handler application is launched.
errorCodeDescribes the error if the call was not succesful.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/getHandlerForUrl '{ "url": "file:///media/internal/downloads/pat5463489.pdf" }'
luna-send -n 1 -f luna://com.palm.applicationManager/getHandlerForUrl '{ "url": "http://www.google.fi" }'

Example responses for succesful calls:

{
"subscribed": false,
"returnValue": true,
"mimeType": "application\/pdf",
"appId": "com.quickoffice.ar",
"download": true
}
{
"subscribed": false,
"returnValue": true,
"appId": "com.palm.app.browser",
"download": false
}

Example response for a failed call:

{
"subscribed": false,
"returnValue": false,
"errorCode": "No handler found for url [file:\/\/\/media\/internal\/downloads\/pat5463489]"
}


getHandlerForMimeTypeByVerb

Public.

com.palm.applicationManager/getHandlerForMimeTypeByVerb

Search for a handler application for a mime type and filter the results with a verb.

Syntax:

{
"mime": string,
"verb": string
}
Parameters
mimeThe mime type to get handler for.
verbThe verb to search for.

Returns:

{
"subscribed": boolean,
"returnValue": boolean,
"mimeType": string,
"appId": string,
"download": boolean,
"index": int,
"errorCode": string
}
Parameters
subscribedAlways false, no subscriptions available.
returnValueIndicates if the call was succesful.
mimeTypeThe mime type that was given as parameter.
appIdThe ID of the handler application.
downloadIs a remote resource downloaded before the handler application is launched.
indexIndex for the application.
errorCodeDescribes the error if the call was not succesful.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/getHandlerForMimeTypeByVerb '{"mime": "audio/mpa", "verb": "exampleVerb" }'

Example response for a succesful call:

{
"subscribed": false,
"returnValue": true,
"mimeType": "audio\/mpa",
"appId": "com.palm.app.streamingmusicplayer",
"download": false,
"index": 179
}

Example response for a failed call:

{
"subscribed": false,
"returnValue": false,
"errorCode": "No resource handler found for audio\/mpa"
}


getHandlerForUrlByVerb

Public.

com.palm.applicationManager/getHandlerForUrlByVerb

Search for a handler application for an URL and filter the results with a verb.

Syntax:

{
"url": string,
"verb": string
}
Parameters
urlThe URL to get handler for.
verbThe verb to search for.

Returns:

{
"subscribed": boolean,
"returnValue": boolean,
"appId": string,
"download": boolean,
"index": int,
"errorCode": string
}
Parameters
subscribedAlways false, no subscriptions available.
returnValueIndicates if the call was succesful.
appIdThe ID of the handler application.
downloadIs a remote resource downloaded before the handler application is launched.
indexIndex for the application.
errorCodeDescribes the error if the call was not succesful.
returnValueIndicates if the call was succesful.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/getHandlerForUrlByVerb '{ "url": "sprint-music:", "verb": "exampleVerb" }'

Example response for a succesful call:

{
"subscribed": false,
"returnValue": true,
"appId": "com.palm.sprintmusicplus",
"download": false,
"index": 136
}

Example response for a failed call:

{
"subscribed": false,
"returnValue": false,
"errorCode": "No redirect handler found for sprint-music:"
}


listAllHandlersForMime

Public.

com.palm.applicationManager/listAllHandlersForMime

Get all handlers for a mime type.

Syntax:

{
"mime": string
}
Parameters
mimeThe mime type.

Returns:

{
"subscribed": boolean,
"mime": string,
"returnValue": boolean,
"resourceHandlers": {
"activeHandler": {
"mime": string,
"extension": string,
"appId": string,
"streamable": boolean,
"index": int,
"tag": string,
"verbs": {
"<name of the verb>": string,
...
},
"appName": string
},
"alternates": [ object array ]
}
}
Parameters
subscribedAlways false, no subscriptions available.
mimeThe mime type that was given as parameter.
returnValueIndicates if the call was succesful.
resourceHandlersResource handlers for the mime type. See below.
activeHandlerCurrent active handler for the mime type. See fields below.
mimeThe mime type.
extensionFile type extension for this mime type.
appIdId of the handler application.
streamableTrue if the content is streamable.
indexIndex for the application.
tagA tag for the handler application.
verbsObject that contains any verbs registered for the application.
appNameName of the handler application.
alternatesAlternative handler applications.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/listAllHandlersForMime '{ "mime": "audio/mpa" }'

Example response for a succesful call:

{
"subscribed": false,
"mime": "audio\/mpa",
"returnValue": true,
"resourceHandlers": {
"activeHandler": {
"mime": "audio\/mpa",
"extension": "mp3",
"appId": "com.palm.app.streamingmusicplayer",
"streamable": true,
"index": 179,
"tag": "system-default",
"appName": "Streaming Music Player"
},
"alternates": [
{
"mime": "audio\/mpa",
"extension": "audio.mpa",
"appId": "com.palm.app.musicplayer",
"streamable": true,
"index": 131,
"appName": "Music"
}
]
}
}

Example response for a failed call:

{
"subscribed": false,
"mime": "foobar",
"returnValue": false,
"errorCode": "No handlers found for foobar"
}


listAllHandlersForUrl

Public.

com.palm.applicationManager/listAllHandlersForUrl

Get all handlers for an URL.

Syntax:

{
"url": string
}
Parameters
urlThe URL.

Returns:

{
"subscribed": boolean,
"url": string,
"returnValue": boolean,
"redirectHandlers": {
"activeHandler": {
"url": string,
"appId": string,
"streamable": boolean,
"index": int,
"tag": string,
"schemeForm": boolean,
"verbs": {
"<name of the verb>": string
}
"appName": string
},
"alternates": [ object array ]
}
}
Parameters
subscribedAlways false, no subscriptions available.
urlThe URL that was given as parameter.
returnValueIndicates if the call was succesful.
redirectHandlersRedirecting handler applications for the URL. See below.
activeHandlerCurrent active handler for the URL. See fields below.
urlThe URL pattern handled by this application.
appIdId of the handler application.
indexIndex for the application.
tagA tag for the handler application.
schemeFormTrue if url is an URI scheme.
verbsObject containing any verbs registered for this handler.
appNameName of the handler application.
alternatesAlternative handler applications.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/listAllHandlersForUrl '{"url": "http://www.google.com"}'

Example response for a succesful call:

{
"subscribed": false,
"url": "http:\/\/www.google.com",
"returnValue": true,
"redirectHandlers": {
"activeHandler": {
"url": "^https?:",
"appId": "com.palm.app.browser",
"index": 16,
"tag": "system-default",
"schemeForm": true,
"appName": "Web"
}
}
}

Example response for a failed call:

{
"subscribed": false,
"url": "www.google.com",
"returnValue": false,
"errorCode": "No handlers found for www.google.com"
}


listAllHandlersForMultipleMime

Public.

com.palm.applicationManager/listAllHandlersForMultipleMime

List all handlers for multiple mime types.

Syntax:

{
"mimes": [ string array ]
}
Parameters
mimesThe mime types for which to list handlers.

Returns:

{
"subscribed": boolean,
"returnValue": boolean,
errorCode: string,
"<mime>": {
"activeHandler": {
"mime": string,
"extension": string,
"appId": string,
"streamable": boolean,
"index": int,
"appName": string
},
"alternates": [ object array ]
},
...
}
Parameters
subscribedAlways false, no subscriptions.
returnValueIndicates if the call was succesful.
errorCodeDescribes the error if call was not succesful.
<mime>Object, contains the handlers.
activeHandlerCurrently active handler for the particular mime type.
mimeThe mime type.
extensionFile type extension corresponding the mime type.
appIdID for the handler application.
streamableCan the application handle streaming content.
indexIndex of the application.
appNameName of the handler application.
alternatesObject array containing any alternate handler applications.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/listAllHandlersForMultipleMime '{ "mimes": [ "application/pdf", "audio/mpa" ] }'

Example response for a succesful call:

{
"subscribed": false,
"returnValue": true,
"application/pdf": {
"activeHandler": {
"mime": "application\/pdf",
"extension": "pdf",
"appId": "com.quickoffice.ar",
"streamable": false,
"index": 150,
"appName": "Adobe Reader"
}
},
"audio/mpa": {
"activeHandler": {
"mime": "audio\/mpa",
"extension": "mp3",
"appId": "com.palm.app.streamingmusicplayer",
"streamable": true,
"index": 179,
"tag": "system-default",
"appName": "Streaming Music Player"
},
"alternates": [
{
"mime": "audio\/mpa",
"extension": "audio.mpa",
"appId": "com.palm.app.musicplayer",
"streamable": true,
"index": 131,
"appName": "Music"
}
]
}
}

Example response for a failed call:

{
"subscribed": false,
"returnValue": false,
"errorCode": "Missing 'mimes' array parameter"
}


listAllHandlersForMultipleUrlPattern

Public.

com.palm.applicationManager/listAllHandlersForMultipleUrlPattern

Lists all handler applications for multiple URLs.

Syntax:

{
"urls": [string array]
}
Parameters
urlsThe urls for which to find handlers.

Returns:

{
"subscribed": boolean,
"returnValue": boolean,
errorCode: string,
"<url>": {
"activeHandler": {
"url": string,
"appId": string,
"index": int,
"tag": string,
"schemeForm": boolean,
"appName": string
},
"alternates": [ object array ]
},
...
}
Parameters
subscribedAlways false, no subscriptions.
returnValueIndicates if the call was succesful.
errorCodeDescribes the error if call was not succesful.
<url>Object, contains the handlers.
activeHandlerCurrently active handler for the particular mime type.
urlThe url pattern.
appIdID for the handler application.
indexIndex of the application.
tagA tag for the application.
schemeFormTrue if url is an URI scheme.
appNameName of the handler application.
alternatesObject array containing any alternate handler applications.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/listAllHandlersForMultipleUrlPattern '{ "urls": ["^https?:", "^mailto:"] }'

Example response for a succesful call:

{
"subscribed": false,
"returnValue": true,
"^https?:": {
"activeHandler": {
"url": "^https?:",
"appId": "com.palm.app.browser",
"index": 126,
"tag": "system-default",
"schemeForm": true,
"appName": "Web"
}
},
"^mailto:": {
"activeHandler": {
"url": "^mailto:",
"appId": "com.palm.app.email",
"index": 128,
"tag": "system-default",
"schemeForm": true,
"appName": "Email"
}
}
}

Example response for a failed call:

{
"subscribed": false,
"returnValue": false,
"errorCode": "Bad 'urls' array parameter specified"
}


listAllHandlersForUrlPattern

Public.

com.palm.applicationManager/listAllHandlersForUrlPattern

List all handler applications for an URL pattern.

Syntax:

{
"urlPattern": url
}

Returns:

{
"subscribed": false,
"urlPattern": "^https?:",
"returnValue": true,
"redirectHandlers": {
"activeHandler": {
"url": "^https?:",
"appId": "com.palm.app.browser",
"index": 126,
"tag": "system-default",
"schemeForm": true
},
"alternates": [ object array ]
}
}
Parameters
returnValueIndicates if the call was succesful.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/listAllHandlersForUrlPattern '{ "urlPattern": "^https?:" }'

Example response for a succesful call:

{
"subscribed": false,
"urlPattern": "^https?:",
"returnValue": true,
"redirectHandlers": {
"activeHandler": {
"url": "^https?:",
"appId": "com.palm.app.browser",
"index": 126,
"tag": "system-default",
"schemeForm": true
}
}
}

Example response for a failed call:

{
"subscribed": false,
"urlPattern": "foo",
"returnValue": false,
"errorCode": "No handlers found for foo"
}


listAllHandlersForMimeByVerb

Public.

com.palm.applicationManager/listAllHandlersForMimeByVerb

List all handlers for a mime type and filter the results by a verb.

Syntax:

{
"verb": string,
"mime": string
}
Parameters
verbThe verb to search for.
mimeThe mime type to search handlers for.

Returns:

{
"subscribed": boolean,
"mime": string,
"verb": string,
"returnValue": boolean,
"errorCode": string
"resourceHandlers": { object }
}
Parameters
subscribedAlways false, no subscriptions available.
mimeThe mime type given as parameter.
verbThe verb that was given as parameter.
returnValueIndicates if the call was succesful.
errorCodeDescribes the error if the call was not succesful.
resourceHandlersObject containing the resource handlers that have the verb that was searched for. Syntax for this is the same as in listAllHandlersForMime.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/listAllHandlersForMimeByVerb '{"verb": "exampleVerb", "mime": "audio/mpa"}'

Example response for a succesful call:

{
"subscribed": false,
"mime": "audio\/mpa",
"verb": "exampleVerb",
"returnValue": true,
"resourceHandlers": {
"alternates": [
{
"mime": "audio\/mpa",
"extension": "mp3",
"appId": "com.palm.app.streamingmusicplayer",
"streamable": true,
"index": 179,
"tag": "system-default",
"verbs": {
"exampleVerb": "42"
}
}
]
}
}

Example response for a failed call:

{
"subscribed": false,
"mime": "audio\/mpa",
"verb": "noSuchVerb",
"returnValue": false,
"errorCode": "No handlers found for audio\/mpa"
}


listAllHandlersForUrlByVerb

Public.

com.palm.applicationManager/listAllHandlersForUrlByVerb

Search for handlers for an URL and filter the results by a verb.

Syntax:

{
"verb": string,
"url": string
}
Parameters
verbThe verb to filter the results with.
urlThe URL to search handlers for.

Returns:

{
"subscribed": boolean,
"url": string,
"verb": string,
"returnValue": boolean,
"errorCode": string
"redirectHandlers": { object }
}
Parameters
subscribedAlways false, no subscriptions available.
mimeThe mime type given as parameter.
verbThe verb that was given as parameter.
returnValueIndicates if the call was succesful.
errorCodeDescribes the error if the call was not succesful.
redirectHandlersObject containing the redirect handlers that have the verb that was searched for. Syntax for this is the same as in listAllHandlersForUrl.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/listAllHandlersForUrlByVerb '{"verb": "exampleVerb", "url": "sprint-music:"}'

Example response for a succesful call:

{
"subscribed": false,
"url": "sprint-music:",
"verb": "exampleVerb",
"returnValue": true,
"redirectHandlers": {
"alternates": [
{
"url": "^sprint-music:",
"appId": "com.palm.sprintmusicplus",
"index": 136,
"tag": "system-default",
"schemeForm": true,
"verbs": {
"exampleVerb": "42"
}
}
]
}
}

Example response for a failed call:

{
"subscribed": false,
"url": "sprint-music:",
"verb": "noSuchVerb",
"returnValue": false,
"errorCode": "No handlers found for sprint-music:"
}


listExtensionMap

Public.

com.palm.applicationManager/listExtensionMap

List file type extensions and mime types.

Syntax:

{
}

Returns:

{
"subscribed": boolean,
"returnValue": boolean,
"extensionMap": [
{
"<extension>": "<mime type>"
}
]
}
Parameters
subscribedAlways false, no subscriptions available.
returnValueIndicates if the call was succesful.
extensionMapObject array.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/listExtensionMap '{}'

Example response:

{
"subscribed": false,
"returnValue": true,
"extensionMap": [
{
"3g2": "video\/3gpp2"
},
{
"3ga": "audio\/3gpp"
},
...
{
"xls": "application\/xls"
},
{
"xlsx": "application\/xls"
}
]
}


swapResourceHandler

Private.

com.palm.applicationManager/swapResourceHandler

Change the active handler application for a mime type.

Syntax:

{
"mimeType": string,
"index": int
}
Parameters
mimeTypeThe mime type for which to change the handler.
indexIndex of the new handler application.

Returns:

{
"subscribed": boolean,
"returnValue": boolean,
"errorCode": string
}
Parameters
subscribedAlways false, no subscriptions.
returnValueIndicates if the call was succesful.
errorCodeDescribes the error if call was not succesful.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/swapResourceHandler '{ "mimeType": "application/pdf", "index": 150 }'

Example response for a succesful call:

{
"subscribed": false,
"returnValue": true
}

Example response for a failed call:

{
"subscribed": false,
"returnValue": false,
"errorCode": "swap failed (incorrect index for mime type, perhaps?)"
}


swapRedirectHandler

Private.

com.palm.applicationManager/swapRedirectHandler

Change the redirect handler application for an URL pattern.

Syntax:

{
"url": string,
"index": int
}
Parameters
urlThe URL pattern for which to change the handler.
indexIndex of the new handler application.

Returns:

{
"subscribed": boolean,
"returnValue": boolean,
"errorCode": string
}
Parameters
subscribedAlways false, no subscriptions.
returnValueIndicates if the call was succesful.
errorCodeDescribes the error if call was not succesful.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/swapRedirectHandler '{ "url": "^im:", "index": 134 }'

Example response for a succesful call:

{
"subscribed": false,
"returnValue": true
}

Example response for a failed call:

{
"subscribed": false,
"returnValue": false,
"errorCode": "swap failed (incorrect index for url, perhaps?)"
}


registerVerbsForRedirect

Private.

com.palm.applicationManager/registerVerbsForRedirect

Register verbs for a redirect handler.

Syntax:

{
"appId": string,
"url": string,
"verbs": {
"<nameOfVerb>": int,
...
}
}
Parameters
appIdID of the handler application.
urlThe url pattern handled for which to register the verbs.
verbsObject containing key-value pairs of name of the verb and a value for it as an int.

Returns:

{
"subscribed": boolean,
"returnValue": boolean,
"errorCode": string
}
Parameters
subscribedAlways false, no subscriptions.
returnValueIndicates if the call was succesful.
errorCodeDescribes the error if call was not succesful.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/registerVerbsForRedirect '{ "appId": "com.palm.sprintmusicplus", "url": "^sprint-music:", "verbs": { "exampleVerb": 42 } }'

Example response for a succesful call:

{
"subscribed": false,
"returnValue": true
}

Example response for a failed call:

{
"subscribed": false,
"returnValue": false,
"errorCode": "No verbs specified\/invalid verb list format"
}


registerVerbsForResource

Private.

com.palm.applicationManager/registerVerbsForResource

Register verbs for a resource.

Syntax:

{
"appId": string,
"mime": string,
"verbs": {
"<nameOfVerb>": int,
...
}
}
Parameters
appIdID of the handler application.
mimeThe mime type of the resource.
verbsObject containing key-value pairs of name of the verb and a value for it as an int.

Returns:

{
"subscribed": boolean,
"returnValue": boolean,
"errorCode": string
}
Parameters
subscribedAlways false, no subscriptions.
returnValueIndicates if the call was succesful.
errorCodeDescribes the error if call was not succesful.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/registerVerbsForResource '{ "appId": "com.palm.app.streamingmusicplayer", "mime": "audio/mpa", "verbs": { "exampleVerb": 42 } }'

Example response for a succesful call:

{
"subscribed": false,
"returnValue": true
}

Example response for a failed call:

{
"subscribed": false,
"returnValue": false,
"errorCode": "No verbs specified\/invalid verb list format"
}


removeHandlersForAppId

Private.

com.palm.applicationManager/removeHandlersForAppId

Remove an application from resource or redirect handlers.

Syntax:

{
"appId": string
}

Returns:

{
"subscribed": boolean,
"returnValue": boolean,
"errorText": string
}
Parameters
subscribedAlways false, no subscriptions.
returnValueIndicates if the call was succesful.
errorCodeDescribes the error if call was not succesful.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/removeHandlersForAppId '{ "appId": "com.palm.app.videoplayer" }'

Example response for a succesful call:

{
"subscribed": false,
"returnValue": true
}

Example response for a failed call:

{
"subscribed": false,
"returnValue": false,
"errorCode": "Missing appId parameter"
}


saveMimeTable

Private.

com.palm.applicationManager/saveMimeTable

Save the current mime table.

Syntax:

{
"file": string
}
Parameters
fileThe file where the mime table is saved to. If not specified, the table is saved to the current file.

Returns:

{
"subscribed": boolean,
"returnValue": boolean,
"errorCode": string
}
Parameters
subscribedAlways false, no subscriptions.
returnValueIndicates if the call was succesful.
errorCodeDescribes the error if call was not succesful.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/saveMimeTable '{ "file": "/tmp/savedmimetable" }'

Example response for a succesful call:

{
"subscribed": false,
"returnValue": true
}

Example response for a failed call:

{
"subscribed": false,
"returnValue": false,
"errorCode": "Saving mime table failed - Unable to open file \/tmp\/webos\/savedmimetable"
}


restoreMimeTable

Private.

com.palm.applicationManager/restoreMimeTable

Restore a saved mime table.

Syntax:

{
"file": string
}

Returns:

{
"subscribed": boolean,
"returnValue": boolean,
"errorCode": string
}
Parameters
subscribedAlways false, no subscriptions.
returnValueIndicates if the call was succesful.
errorCodeDescribes the error if call was not succesful.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/restoreMimeTable '{ "file": "/tmp/savedmimetable" }'

Example response for a succesful call:

{
"subscribed": false,
"returnValue": true
}

Example response for a failed call:

{
"subscribed": false,
"returnValue": false,
"errorCode": "Restoring mime table failed - No saved tables found in \/tmp\/saved"
}


clearMimeTable

Private.

com.palm.applicationManager/clearMimeTable

Clear mime table.

Syntax:

{
}

Returns:

{
"subscribed": boolean,
"returnValue": boolean,
"errorCode": string
}
Parameters
subscribedAlways false, no subscriptions.
returnValueIndicates if the call was succesful.
errorCodeDescribes the error if call was not succesful.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/clearMimeTable '{}'

Example response for a succesful call:

{
"subscribed": false,
"returnValue": true
}

Example response for a failed call:

{
"subscribed": false,
"returnValue": true,
"errorCode": "clearing mime tables failed"
}


resetToMimeDefaults

Private.

com.palm.applicationManager/resetToMimeDefaults

Reset mime table to default.

Syntax:

{
}

Returns:

{
"subscribed": boolean,
"returnValue": boolean
}
Parameters
returnValueIndicates if the call was succesful.
subscribedAlways false, no subscriptions.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/resetToMimeDefaults '{}'

Example response for a succesful call:

{
"subscribed": false,
"returnValue": true
}


forceSingleAppScan

Private.

com.palm.applicationManager/forceSingleAppScan

Make a forced post install scan for an application.

Syntax:

{
"id": string
}

Returns:

{
"subscribed": boolean,
"returnValue": boolean,
"errorText": string
}
Parameters
subscribedAlways false, no subscriptions.
returnValueIndicates if the call was succesful.
errorTextDescribes the error if call was not succesful.
returnValueIndicates if the call was succesful.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/forceSingleAppScan '{ "id": "com.palm.app.browser" }'

Example response for a succesful call:

{
"subscribed": false,
"returnValue": true
}

Example response for a failed call:

{
"subscribed": false,
"returnValue": false,
"errorText": "no key 'id' provided"
}


getAppBasePath

Public.

com.palm.applicationManager/getAppBasePath

Get the path to the app for a given application ID.

Syntax:

{
"appId": string
}

Returns:

{
"returnValue": boolean,
"appId": string,
"basePath": string
"errorText": string
}
Parameters
returnValueIndicates if the call was succesful.
appIdThe application ID.
basePathPath to the application.
errorTextDescription of the error if call was not succesful.

Examples:

luna-send -n 1 -f luna://com.palm.applicationManager/getAppBasePath '{ "appId": "com.palm.app.youtube" }'

Example response for a succesful call:

{
"returnValue": true,
"appId": "com.palm.app.youtube",
"basePath": "file:\/\/\/media\/cryptofs\/apps\/usr\/palm\/applications\/com.palm.app.youtube\/index.html"
}

Example response for a failed call:

{
"returnValue": false,
"errorText": "Invalid appId specified: foobar"
}