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

Public methods:


systemUi

Public.

com.palm.systemmanager/systemUi

Send commands to the system UI.

Syntax:

{
"<target>": <commands>
}

The type of the commands depends on the target.


launcheraction

Syntax:

{
"launcheraction": string
}

Valid commands for the launcheraction are:

  • showAppMenu Shows the application menu.
  • showAppInfo Shows application info.
  • editPageTitle Edit the page title.

Example:

luna-send -n 1 -f luna://com.palm.systemmanager/systemUi '{ "launcheraction": "showAppMenu" }'


virtualkeyboard

Syntax:

{
"virtualkeyboard": { <command>: <value>, <command>: <value>, ... }
}

Valid commands for virtualkeyboard:

  • get Will get a named value from the current keyboard.
  • height Set the height for the keyboard in pixels.
  • size Set a pre-defined size for the keyboard, -2 is XS, -1 is S, 0 is M, and 1 is L.
  • hide Hide the keyboard if the value is true.

Example:

luna-send -i -n 1 luna://com.palm.systemmanager/systemUi '{ "virtualkeyboard":{"hide": true, "size": -1} }'


quicklaunch

Show or hide the quicklaunch dock.

Syntax:

{
"quicklaunch": boolean
}

Example:

luna-send -n 1 -f luna://com.palm.systemmanager/systemUi '{ "quicklaunch": true }'


universal search

Show or hide the universal search.

Syntax:

{
"universal search": boolean
}

Example:

luna-send -i -n 1 luna://com.palm.systemmanager/systemUi '{"universal search": true }'


launcher

Show or hide the launcher.

Syntax:

{
"launcher": boolean
}

Example:

luna-send -i -n 1 luna://com.palm.systemmanager/systemUi '{"launcher": true }'


launchermenu

Send commands to launcher menu.

Syntax:

{
"launchermenu": string
}

Valid commands for launchermenu:

  • addcard
  • reordercards
  • deletecard
  • invokerenamecard
  • other

Example:

luna-send -i -n 1 luna://com.palm.systemmanager/systemUi '{"launchermenu": "addcard" }'


launchertitlechange

Change a card title in the launcher.

Syntax:

{
"launchertitlechange": { "id": int, "label": string }
}
Parameters
idId of the card.
labelNew title for the card.
luna-send -i -n 1 luna://com.palm.systemmanager/systemUi '{"launchertitlechange": {"id":1, "label": "new title"} }'


getAppRestoreNeeded

Public.

com.palm.systemmanager/getAppRestoreNeeded

Subscribe to events indicating application restore is needed.

Syntax:

{
"subscribe": boolean
}
Parameters
subscribeSet to true to subscribe to status change events.

Returns:

{
"returnValue": boolean,
"subscribed": boolean
}
Parameters
returnValueIndicates if the call was succesful.
subscribedTrue if subscribed to events.

Examples:

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

Example response for a succesful call:

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


clearCache

Public.

com.palm.systemmanager/clearCache

Clear the webkit cache.

Syntax:

{
}

Returns:

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

Examples:

luna-send -n 1 -f luna://com.palm.systemmanager/clearCache '{}'

Example response for a succesful call:

{
"returnValue": true
}


takeScreenShot

Public.

com.palm.systemmanager/takeScreenShot

Take a screenshot.

Syntax:

{
"file": string
}
Parameters
fileDestination path for the screenshot image. Can be absolute or relative path. If the path is relative, the image will be stored under home folder.

Returns:

{
"returnValue": boolean
}
Parameters
@subsectioncom_palm_systemmanager_take_screen_shot_examples Examples:
luna-send -n 1 -f luna://com.palm.systemmanager/takeScreenShot '{ "file": "screenshot.jpg" }'

Example response for a succesful call:

{
"returnValue": true
}

Example response for a failed call:

{
"returnValue": false
}


applicationHasBeenTerminated

Public.

com.palm.systemmanager/applicationHasBeenTerminated

Subscribe to events indicating application has been terminated

Syntax:

{
"subscribe": boolean
}
Parameters
subscribeSet to true to subscribe to events.

Returns:

{
"returnValue": boolean,
"subscribed": boolean
}
Parameters
returnValueIndicates if the call was succesful.
subscribedTrue if subscribed to events.

Examples:

luna-send -n 10 -f luna://com.palm.systemmanager/applicationHasBeenTerminated '{ "subscribe": true }'

Example response for a succesful call:

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


getForegroundApplication

Public.

com.palm.systemmanager/getForegroundApplication

Get foreground application.

Syntax:

{
"subscribe": boolean
}
Parameters
subscribeSet to true to receive events when foregound application changes.

Returns:

{
"title": string,
"id": string,
"appmenu": string,
"returnValue": boolean,
"subscribed": boolean
}
Parameters
titleTitle of the application.
idId of the application.
appmenuTitle of the application menu.
returnValueIndicates if the call was succesful
subscribedTrue if subscribed to events.

Examples:

luna-send -f -n 1 luna://com.palm.systemmanager/getForegroundApplication '{"subscribe": false}'

Example response when an application is running:

{
"title": "Web",
"id": "com.palm.app.browser",
"appmenu": "Web",
"returnValue": true,
"subscribed": false
}

Exmple response when there is no foreground application:

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


getLockStatus

Public.

com.palm.systemmanager/getLockStatus

Get status of screen lock.

Syntax:

{
"subscribe": boolean
}
Parameters
subscribeSet to true to receive events when screen lock status changes.

Returns:

{
"locked": boolean,
"returnValue": boolean,
"subscribed": boolean
}
Parameters
lockedTrue if the screen is locked.
returnValueIndicates if the call was succesful
subscribedTrue if subscribed to events.

Examples:

luna-send -n 1 -f luna://com.palm.systemmanager/getLockStatus '{ "subscribe": false }'

Example response for a succesful call:

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


getDockModeStatus

Public.

com.palm.systemmanager/getDockModeStatus

Find out if device is in dock mode.

Syntax:

{
"subscribe": boolean
}
Parameters
subscribeSet to true to receive events when screen lock status changes.

Returns:

{
"enabled": boolean,
"returnValue": boolean,
"subscribed": boolean
}
Parameters
enabledTrue if the device is in dock mode.
returnValueIndicates if the call was succesful
subscribedTrue if subscribed to events.

Examples:

luna-send -n 1 -f luna://com.palm.systemmanager/getDockModeStatus '{ "subscribe": false }'

Example response for a succesful call:

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


setDevicePasscode

Public.

com.palm.systemmanager/setDevicePasscode

Set device lock mode and passcode. This can be a simple pin code with just digits, or a password with any characters.

Syntax:

{
"lockMode":string,
"passCode":string
}
Parameters
lockModeCan be "pin" or "password".
passCodeNew passcode. Pin should contain only digits, but password can contain any characters.

Returns:

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

Examples:

luna-send -n 1 -f luna://com.palm.systemmanager/setDevicePasscode '{ "lockMode": "password", "passCode": "password1234" }'

Example response for a succesful call:

{
"returnValue": true
}


matchDevicePasscode

Public.

com.palm.systemmanager/matchDevicePasscode

Check the passcode received from user against the one set to the device.

Syntax:

{
"passCode":string
}
Parameters
passCodeCode to check.

Returns:

{
"returnValue": boolean,
"lockedOut": boolean,
"retriesLeft": int
}
Parameters
returnValueIndicates if the passcode was correct.
lockedOutWas the user locked out.
retriesLeftHow many retries are left.

Examples:

luna-send -n 1 -f luna://com.palm.systemmanager/matchDevicePasscode '{ "passCode": "1234" }'

Example response for a succesful call:

{
"returnValue": false,
"lockedOut": false,
"retriesLeft": 0
}


getDeviceLockMode

Public.

com.palm.systemmanager/getDeviceLockMode

Check the device lock mode.

Syntax:

{
"subscribe": boolean
}
Parameters
subscribeSet to true to reveive events when lock mode changes.

Returns:

{
"returnValue": boolean,
"subscribed": boolean,
"lockMode": string,
"policyState": string,
"retriesLeft": int
}
Parameters
returnValueIndicates if the call was succesful
subscribedTrue if subscribed to receive mode change events.
lockModeCurrent lock mode, "password", "pin", or "none".
policyStateExchange Auto Sync security policy state, "none", "active" or "pending".
retriesLeftNumber of passcode attempts left.

Examples:

luna-send -n 1 -f luna://com.palm.systemmanager/getDeviceLockMode '{ "subscribe": false }'

Example response for a succesful call:

{
"returnValue": true,
"subscribed": true,
"lockMode": "pin",
"policyState": "active",
"retriesLeft": 0
}


getSecurityPolicy

Public.

com.palm.systemmanager/getSecurityPolicy

Get information about the Exchange Active Sync (EAS) security policy.

Syntax:

{
}

Returns:

{
"policy": {
"password": {
"enabled": boolean,
"minLength": int,
"maxRetries": int,
"alphaNumeric": boolean
},
"inactivityInSeconds": int,
"id": string,
"status": {
"enforced": boolean,
"retriesLeft": int
}
},
"returnValue": boolean
}
Parameters
policyPolicy object, see fields below.
passwordPassword object, see fields below.
enabledIs password enabled.
minLengthMinimum length for the password.
maxRetriesMaximum amount of retries when inputting password.
alphanumericIf true, password needs to have both numbers and letters.
inactivityInSecondsInactive time in seconds after which device is locked.
idPolicy ID.
statusStatus object, see fields below.
enforcedIs policy enforced.
retriesLeftNumber of retries left when inputting password.
returnValueIndicates if the call was succesful.

Examples:

luna-send -n 1 -f luna://com.palm.systemmanager/getSecurityPolicy '{}'

Example response for a succesful call:

{
"policy": {
"password": {
"enabled": false,
"minLength": 1,
"maxRetries": 0,
"alphaNumeric": false
},
"inactivityInSeconds": 9998,
"id": "++I8e9WUZ1KeeTfH",
"status": {
"enforced": true,
"retriesLeft": 0
}
},
"returnValue": true
}


updatePinAppState

Public.

com.palm.systemmanager/updatePinAppState

Update pin code application state.

Syntax:

{
"state":string
}
Parameters
stateNew state, can be "cancel" or "unlock".

Returns:

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

Examples:

luna-send -n 1 -f luna://com.palm.systemmanager/updatePinAppState '{ "state": "unlock" }'

Example response for a succesful call:

{
"returnValue": true
}

Example response for a failed call:

{
"returnValue": false
}


getBootStatus

Public.

com.palm.systemmanager/getBootStatus

Check the device boot status.

Syntax:

{
"subscribe": boolean
}
Parameters
subscribeSet to true to receive events when boot status changes.

Returns:

{
"finished": boolean,
"firstUse": boolean,
"returnValue": boolean,
"subscribed": boolean
}
Parameters
finishedIs boot sequence finished.
firstUseIs this the first time the device is booted.
returnValueIndicates if the call was succesful.
subscribedTrue if subscribed to receive boot status change events.

Examples:

luna-send -n 1 -f luna://com.palm.systemmanager/getBootStatus '{ "subscribe": false }'

Example response for a succesful call:

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


runProgressAnimation

Public.

com.palm.systemmanager/runProgressAnimation

Syntax:

{
"type": string,
"state": string
}
Parameters
typeType of the animation, "msm" or "fsck".
stateNew state for the animation. "start" shows the animation, and "stop" hides it.

Returns:

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

Examples:

luna-send -n 1 -f luna://com.palm.systemmanager/runProgressAnimation '{ "type": "msm", "state": "start" }'

Example response for a succesful call:

{
"returnValue": true
}

Example response for a failed call:

{
"returnValue": false
}


setJavascriptFlags

Public.

com.palm.systemmanager/setJavascriptFlags

Set JavaScript flags.

Syntax:

{
"flags": string
}
Parameters
flagsThe flags you want to set.

Returns:

{
"returnValue": boolean
}
Parameters
returnValueIndicates if the call was succesful.
Note
It is up to the user to make sure that the flags make sense. The returnValue only indicates that parsing the incoming JSON message succeeded.

Examples:

luna-send -n 1 -f luna://com.palm.systemmanager/setJavascriptFlags '{"flags": "--jstop --jstop_debug" }'

Example response for a succesful call:

{
"returnValue": true
}

Example response for a failed call:

{
"returnValue": false
}


setAnimationValues

Public.

com.palm.systemmanager/setAnimationValues

Set animation parameters.

Syntax:

{
"<key>": int,
"<key>": int,
...
}
Parameters
<key>Key-value pairs for the parameters.

Returns:

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

Examples:

luna-send -n 1 -f luna://com.palm.systemmanager/setAnimationValues '{ "brickDuration": 300, "cardDeleteCurve": 6 }'

Example response for a succesful call:

{
"returnValue": true
}

Example response for a failed call:

{
"returnValue": false
}


getAnimationValues

Public.

com.palm.systemmanager/getAnimationValues

Get animation parameters.

Syntax:

{
}

Returns:

{
"<key>": int,
"<key>": int,
...
"<key>": int,
"returnValue": boolean
}
Parameters
<key>Key-value pairs for the parameters.
returnValueIndicates if the call was succesful.

Examples:

luna-send -n 1 -f luna://com.palm.systemmanager/getAnimationValues '{ }'

Example response for a succesful call:

{
"brickCurve": 0,
"brickDuration": 300,
"cardAddMaxDuration": 750,
"cardBeforeAddDelay": 0,
...
"statusBarTitleChangeDuration": 300,
"universalSearchCrossFadeCurve": 6,
"universalSearchCrossFadeDuration": 150,
"returnValue": true
}


lockButtonTriggered

Public.

com.palm.systemmanager/lockButtonTriggered

Subscribe to lock button trigger events.

Syntax:

{
"subscribe": boolean
}
Parameters
subscribeSet to true to subscribe to lock button trigger events.

Returns:

{
"returnValue": boolean,
"subscribed": boolean,
"triggered": boolean
}
Parameters
returnValueIndicates if the call was succesful.
subscribedTrue if subscribed to receive lock button trigger events.
triggeredTrue if lock button was triggered.

Examples:

luna-send -n 2 -f luna://com.palm.systemmanager/lockButtonTriggered '{ "subscribe": true }'

Example response for a succesful call:

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


- subscribeToSystemUIResponses

Public.

com.palm.systemmanager/subscribeToSystemUIResponses

Subscribe to messages published by SystemUI.

Syntax:

{
"subscribe": boolean
}

Returns:

{
"returnValue": boolean,
"subscribed": boolean
}
Parameters
returnValueIndicates if the call was succesful.
subscribedTrue if subscribed to system UI events.

Examples:

luna-send -n 1 -f luna://com.palm.systemmanager/subscribeToSystemUIResponses '{ }'

Example response for a succesful call:

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

Example response for a failed call:

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


publishToSystemUI

Public.

com.palm.systemmanager/publishToSystemUI

Publish messages to/from system UI. If message comes from system UI, the message will be published to listeners of subscribeToSystemUIResponses().

Syntax:

{
"event": string,
"message": string
}
Parameters
eventType of the event.
messageMessage to display.
Note
Messages are sent to System UI client for processing. If the event is unknown then the message will dropped at the client level.

Returns:

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

Examples:

luna-send -n 1 -f luna://com.palm.systemmanager/publishToSystemUI '{ "event": "itsAnEvent", "message": "Something really important." }'

Example response for a succesful call:

{
"returnValue": true
}

Example response for a failed call:

{
"returnValue": false
}


getSystemStatus

Public.

com.palm.systemmanager/getSystemStatus

Get information about system status.

Syntax:

{
"subscribe": boolean
}
Parameters
subscribeSet to true to receive system status change events.

Returns:

{
"ime": {
"visible": boolean
},
"orientation": {
"ui": string,
"device": string
},
"subscribed": boolean,
"returnValue": boolean
}
Parameters
imeObject, see field below.
visibleIs IME (input method, i.e. virtual keyboard) visible.
orientationObject containing device and UI orientation information. See fields below.
uiOrientation of the UI. "up", "down", "left" or "right".
deviceOrientation of the device. "up", "down", "left", "right", "faceup" or "facedown".
subscribedIndicates if subscribed to receive status change events.
returnValueIndicates if call was succesful.

Examples:

luna-send -n 100 -f luna://com.palm.systemmanager/getSystemStatus '{ "subscribe": true }'

Example response for a succesful call:

{
"ime": {
"visible": false
},
"orientation": {
"ui": "up",
"device": "up"
},
"subscribed": true,
"returnValue": true
}

Example of a status change event after subscribing:

{
"ime": {
"visible": false
},
"orientation": {
"ui": "up",
"device": "facedown"
}
}


dismissModalApp

Public.

com.palm.systemmanager/dismissModalApp

Dismiss a modal application.

Syntax:

{
"subscribe": true,
"modalId": string
}
Parameters
subscribeSubscribe to receive status change events. Must be set to true.
modalIdId of the modal application to dismiss.

Returns:

{
"returnValue": boolean,
"returnMessage": string,
"dismissResult": string,
"subscribed": boolean
}
Parameters
returnValueIndicates if the call was succesful.
returnMessageA message.
dismissResultDescribes the dismiss status.
subscribedIndicates if subscribed to receive status change messages.

Examples:

luna-send -n 2 -f luna://com.palm.systemmanager/dismissModalApp '{ "subscribe": true, "modalId": "MODAL_WINDOW_com.palm.app.photos_com.palm.app.browser_1" }'

Example responses:

{
"returnValue": true,
"dismissResult": "Initiating removal of active modal window",
"subscribed": true
}
{
"returnValue": true,
"returnMessage": "",
"dismissResult": "Modal card was dismissed by the service"
}


launchModalApp

Public.

com.palm.systemmanager/launchModalApp

Launch an application as a modal window from another application.

Syntax:

{
"subscribe": boolean,
"callerId": string,
"launchId": string,
"params": object
}
Parameters
subscribeMust be set to true.
callerIdId of the caller application.
launchIdId of the application to launch.
paramsParameters for the application that is launched.

Returns for a succesfull call:

{
"returnValue": boolean,
"launchResult": string,
"modalId": string,
"subscribed": boolean,
}
Parameters
returnValueIndicates if the call was succesful, i.e. true in this case.
launchResultDescription of launch status.
modalIdId for the modal application window.
subscribedTrue if subscribed to receive status change events.

Returns for a failed call:

{
"returnValue": boolean,
"errorText": string,
"subscribed": boolean,
"errorCode": int
}
Parameters
returnValueIndicates if the call was succesful, i.e. false in this case.
errorTextDescribes the error.
subscribedIndicates if subscribed.
errorCodeCode for the error.

Examples:

luna-send -n 2 -f luna://com.palm.systemmanager/launchModalApp '{ "subscribe": true, "callerId": "com.palm.app.photos", "launchId": "com.palm.app.browser", "params": {} }'

Example response for a succesful launch:

{
"returnValue": true,
"launchResult": "Modal window launch initiated",
"modalId": "MODAL_WINDOW_com.palm.app.photos_com.palm.app.browser_1",
"subscribed": true
}
{
"returnValue": true,
"launchResult": "Modal window was launched successfully"
}

Example response for a failed call:

{
"returnValue": false,
"errorText": "App to launch doesnt exist",
"subscribed": true,
"errorCode": 5
}


touchToShareDeviceInRange

Public.

com.palm.systemmanager/touchToShareDeviceInRange

Start or stop the animation that indicates to user that Touch-to-share is active.

Syntax:

{
"inRange" : boolean
}
Parameters
inRangeSet to true to start the animation and false to stop it.

Returns:

{
"returnValue": boolean
}
Parameters
returnValue

Examples:

luna-send -n 1 -f luna://com.palm.systemmanager/touchToShareDeviceInRange '{ "inRange": true }'

Example response for a succesful call:

{
"returnValue": true
}


touchToShareAppUrlTransferred

Public.

com.palm.systemmanager/touchToShareAppUrlTransferred

After Touch-to-share transfer is complete, call this to show the appropriate animation and minimize the application.

Syntax:

{
"appid" : string
}
Parameters
appidID of the target app.

Returns:

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

Examples:

luna-send -n 1 -f luna://com.palm.systemmanager/touchToShareAppUrlTransferred '{"appid": "com.palm.app.browser" }'

Example response for a succesful call:

{
"returnValue": true
}


subscribeTurboMode

Public.

com.palm.systemmanager/subscribeTurboMode

Subscribe to turbo mode status changes. Turbo mode is enabled on subscription, if it was not yet enabled.

Syntax:

{
"subscribe": boolean
}
Parameters
subscribeSet to true to enable turbo mode and receive events when turbo mode changes. Set to false to remove subscription.

Returns:

{
"returnValue": boolean,
"subscribed": boolean
}
Parameters
returnValueIndicates if call was succesful.
subscribedTrue if subscribed to receive events when turbo mode changes.

Examples:

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

Example response for a succesful call:

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