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

Public methods:


vibrate

Public.

com.palm.vibrate/vibrate

Vibrate the device in periods for a specified duration or infinitely.

Syntax:

{
"period": int,
"duration": int
}
Parameters
intervalPeriod of the vibration in ms. Required.
durationDuration of the vibration in ms. If not specified, device will vibrate until stopped with LSCallCancel.

Returns:

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

Examples:

luna-send -n 1 -f luna://com.palm.vibrate/vibrate '{ "period": 500, "duration": 4000 }'

Example response for a succesful call:

{
"returnValue": true
}

Example response for a failed call:

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


vibrateNamedEffect

Public.

com.palm.vibrate/vibrateNamedEffect

Vibrate an effect.

Syntax:

{
"name": string,
"continous": boolean
}
Parameters
nameName of the effect.
continuosIf true, effect is played until stopped with LSCallCancel.

Returns:

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

Examples:

luna-send -n 1 -f luna://com.palm.vibrate/vibrateNamedEffect '{ "name": "ringtone", "continous": false }'

Example response for a succesful call:

{
"returnValue": true
}

Example response for a failed call:

{
"returnValue": false,
"errorText": "Unable to vibrate"
}