Phone
Applications can make a phone call by launching the Phone application to the dial pad with an optional phone number pre-populating it. The user must confirm the phone call by at least tapping the dial button. Applications cannot complete a call without user assistance. The Application Manager service is used in both cases.
Methods
This section describes the following methods:
- open
- launch
open
Launches the phone dialer in a new card, pre-populating it with the contents of the target URL. To access the phone dialer, construct a call by using the Application Manager's open method, if you are providing part or all of the dial string. The string after the "tel://" prefix in the target property is pre-populated into the dialer. All other property names and values are required.
Required parameter:
- target
Parameters
Parameter | Type | Description |
---|---|---|
target | string |
URL of the from "tel://dialstring", where dialstring is part or all of a phone number. The number can contain pause and wait characters to indicate that DTMF tones should be sent after the call connects.
|
Return Handling
There are no attributes for return handling.
Example
this.controller.serviceRequest('palm://com.palm.applicationManager', { method:'open', parameters: { target: "tel://4085551234" } });
launch
Launches the phone dialer in a new card, without pre-populating the dial string.
Required parameter:
- id
Parameters
Parameter | Type | Description |
---|---|---|
id | string | Set to "com.palm.app.phone", identifying the phone dialer as the launch target. |
Return Handling
There are no attributes for return handling.
Example
this.controller.serviceRequest('palm://com.palm.applicationManager', { method:'launch', parameters: { id:"com.palm.app.phone" } });
Sample Code
See Services Sample.