System Sounds
The System Sounds service plays audio feedback in response to user interaction. The sounds play as soon as the message is played, with low latency.
Method
This section describes the following method:
- playFeedback
playFeedback
Plays a system sound by using the "feedback" stream class. Intended for UI feedback, such as UI button clicks, keypad clicks, and other similar sounds.
Required parameter:
- name
Parameters
Parameter | Type | Description |
---|---|---|
name | string |
The sample name. The following are the supported names, which are subject to change: appclose, back_01, browser_01, card_01, card_02, card_03, card_04, card_05, default_425hz, delete_01, discardingapp_01, down2, dtmf_0, dtmf_1, dtmf_2, dtmf_3, dtmf_4, dtmf_5, dtmf_6, dtmf_7, dtmf_8, dtmf_9, dtmf_asterisk, dtmf_pound, error_01, error_02, error_03, focusing, launch_01, launch_02, launch_03, pagebacwards, pageforward_01, shuffle_02, shuffle_03, shuffle_04, shuffle_05, shuffle_06, shuffle_07, shuffle_08, shuffling_01, shutter, switchingapps_01, switchingapps_02, switchingapps_03, tones_3beeps_otasp_done, unassigned, and up2. |
Return Handling
onSuccess
Attribute | Type | Description |
---|---|---|
errorText | string | If response.returnValue is false, the error is indicated here. |
returnValue | boolean | If true, the sound played successfully. If false, look in errorText for information. |
onFailure
Attribute | Type | Description |
---|---|---|
errorText | string | If response.returnValue is false, the error is indicated here. |
Example
this.controller.serviceRequest("palm://com.palm.audio/systemsounds", { method: "playFeedback", parameters: { name: "dtmf_2" }, onSuccess:{}, onFailure:{} });
Sample Code
See Services Sample.