diff --git a/en/application-dev/reference/apis/js-apis-call.md b/en/application-dev/reference/apis/js-apis-call.md index 0db2092b56445d398e7ee673fbcfc792858ff9b0..bb320e0c8b61e2259aa8c31a6d8efa5866c780fa 100644 --- a/en/application-dev/reference/apis/js-apis-call.md +++ b/en/application-dev/reference/apis/js-apis-call.md @@ -26,9 +26,9 @@ Initiates a call. This API uses an asynchronous callback to return the result. **Parameters** -| Name | Type | Mandatory| Description | -| ----------- | ---------------------------- | ---- | --------------------------------------- | -| phoneNumber | string | Yes | Phone number. | +| Name | Type | Mandatory | Description | +| ----------- | ---------------------------- | ---- | -------------------------------- | +| phoneNumber | string | Yes | Phone number. | | callback | AsyncCallback<boolean> | Yes | Callback used to return the result.
- **true**: success
- **false**: failure | **Example** @@ -52,7 +52,7 @@ Initiates a call. You can set call options as needed. This API uses an asynchron **Parameters** -| Name | Type | Mandatory| Description | +| Name | Type | Mandatory | Description | | ----------- | ---------------------------- | ---- | --------------------------------------- | | phoneNumber | string | Yes | Phone number. | | options | [DialOptions](#dialoptions) | Yes | Call option, which indicates whether the call is a voice call or video call. | @@ -81,10 +81,10 @@ Initiates a call. You can set call options as needed. This API uses a promise to **Parameters** -| Name | Type | Mandatory| Description | +| Name | Type | Mandatory | Description | | ----------- | --------------------------- | ---- | -------------------------------------- | | phoneNumber | string | Yes | Phone number. | -| options | [DialOptions](#dialoptions) | Yes | Call option, which indicates whether the call is a voice call or video call.| +| options | [DialOptions](#dialoptions) | Yes | Call option, which indicates whether the call is a voice call or video call. | **Return value** @@ -115,10 +115,10 @@ Launches the call screen and displays the dialed number. This API uses an asynch **Parameters** -| Name | Type | Mandatory| Description | +| Name | Type | Mandatory | Description | | ----------- | ------------------------- | ---- | ------------------------------------------ | | phoneNumber | string | Yes | Phone number. | -| callback | AsyncCallback<void> | Yes | Callback used to return the result.| +| callback | AsyncCallback<void> | Yes | Callback used to return the result. | **Example** @@ -139,15 +139,15 @@ Launches the call screen and displays the dialed number. This API uses a promise **Parameters** -| Name | Type | Mandatory| Description | +| Name | Type | Mandatory | Description | | ----------- | ------ | ---- | ---------- | -| phoneNumber | string | Yes | Phone number.| +| phoneNumber | string | Yes | Phone number. | **Return value** | Type | Description | | ------------------- | --------------------------------- | -| Promise<void> | Promise used to return the result.| +| Promise<void> | Promise used to return the result. | **Example** @@ -170,9 +170,9 @@ Checks whether a call is in progress. This API uses an asynchronous callback to **Parameters** -| Name | Type | Mandatory| Description | +| Name | Type | Mandatory | Description | | -------- | ---------------------------- | ---- | ------------------------------------------------------------ | -| callback | AsyncCallback<boolean> | Yes | Callback used to return the result. Callback used to return the result.
- **true**: A call is in progress.
- **false**: No call is in progress.| +| callback | AsyncCallback<boolean> | Yes | Callback used to return the result. Callback used to return the result.
- **true**: A call is in progress.
- **false**: No call is in progress. | **Example** @@ -195,7 +195,7 @@ Checks whether a call is in progress. This API uses a promise to return the resu | Type | Description | | ---------------------- | --------------------------------------- | -| Promise<boolean> | Promise used to return the result.| +| Promise<boolean> | Promise used to return the result. | **Example** @@ -219,9 +219,9 @@ Obtains the call status. This API uses an asynchronous callback to return the re **Parameters** -| Name | Type | Mandatory| Description | +| Name | Type | Mandatory | Description | | -------- | -------------------------------------------- | ---- | ------------------------------------ | -| callback | AsyncCallback<[CallState](#callstate)> | Yes | Callback used to return the result.| +| callback | AsyncCallback<[CallState](#callstate)> | Yes | Callback used to return the result. | **Example** @@ -244,7 +244,7 @@ Obtains the call status. This API uses a promise to return the result. | Type | Description | | -------------------------------------- | --------------------------------------- | -| Promise<[CallState](#callstate)> | Promise used to return the result.| +| Promise<[CallState](#callstate)> | Promise used to return the result. | **Example** @@ -269,7 +269,7 @@ Checks whether a device supports voice calls. | Type | Description | | ------- | ------------------------------------------------------------ | -| boolean | - **true**: The device supports voice calls.
- **false**: The device does not support voice calls.| +| boolean | - **true**: The device supports voice calls.
- **false**: The device does not support voice calls. | ```js let result = call.hasVoiceCapability(); @@ -286,10 +286,10 @@ Checks whether the called number is an emergency number. This API uses an asynch **Parameters** -| Name | Type | Mandatory| Description | +| Name | Type | Mandatory | Description | | ----------- | ---------------------------- | ---- | ------------------------------------------------------------ | | phoneNumber | string | Yes | Phone number. | -| callback | AsyncCallback<boolean> | Yes | Callback used to return the result.
- **true**: The called number is an emergency number.
- **false**: The called number is not an emergency number.| +| callback | AsyncCallback<boolean> | Yes | Callback used to return the result.
- **true**: The called number is an emergency number.
- **false**: The called number is not an emergency number. | **Example** @@ -310,11 +310,11 @@ Checks whether the called number is an emergency number based on the phone numbe **Parameters** -| Name | Type | Mandatory| Description | +| Name | Type | Mandatory | Description | | ----------- | -------------------------------------------------- | ---- | -------------------------------------------- | | phoneNumber | string | Yes | Phone number. | | options | [EmergencyNumberOptions](#emergencynumberoptions7) | Yes | Phone number option. | -| callback | AsyncCallback<boolean> | Yes | Callback used to return the result.
- **true**: The called number is an emergency number.
- **false**: The called number is not an emergency number.| +| callback | AsyncCallback<boolean> | Yes | Callback used to return the result.
- **true**: The called number is an emergency number.
- **false**: The called number is not an emergency number. | **Example** @@ -335,16 +335,16 @@ Checks whether the called number is an emergency number based on the phone numbe **Parameters** -| Name | Type | Mandatory| Description | +| Name | Type | Mandatory | Description | | ----------- | -------------------------------------------------- | ---- | -------------- | | phoneNumber | string | Yes | Phone number. | -| options | [EmergencyNumberOptions](#emergencynumberoptions7) | Yes | Phone number option.| +| options | [EmergencyNumberOptions](#emergencynumberoptions7) | Yes | Phone number option. | **Return value** | Type | Description | | ---------------------- | --------------------------------------------------- | -| Promise<boolean> | Promise used to return the result.| +| Promise<boolean> | Promise used to return the result. | **Example** @@ -369,10 +369,10 @@ A formatted phone number is a standard numeric string, for example, 555 0100. **Parameters** -| Name | Type | Mandatory| Description | +| Name | Type | Mandatory | Description | | ----------- | --------------------------- | ---- | ------------------------------------ | | phoneNumber | string | Yes | Phone number. | -| callback | AsyncCallback<string> | Yes | Callback used to return the result.| +| callback | AsyncCallback<string> | Yes | Callback used to return the result. | **Example** @@ -394,11 +394,11 @@ A formatted phone number is a standard numeric string, for example, 555 0100. **Parameters** -| Name | Type | Mandatory| Description | +| Name | Type | Mandatory | Description | | ----------- | -------------------------------------------- | ---- | ------------------------------------ | | phoneNumber | string | Yes | Phone number. | | options | [NumberFormatOptions](#numberformatoptions7) | Yes | Number formatting option, for example, country code. | -| callback | AsyncCallback<string> | Yes | Callback used to return the result.| +| callback | AsyncCallback<string> | Yes | Callback used to return the result. | **Example** @@ -423,16 +423,16 @@ A formatted phone number is a standard numeric string, for example, 555 0100. **Parameters** -| Name | Type | Mandatory| Description | +| Name | Type | Mandatory | Description | | ----------- | -------------------------------------------- | ---- | ---------------------- | | phoneNumber | string | Yes | Phone number. | -| options | [NumberFormatOptions](#numberformatoptions7) | Yes | Number formatting option, for example, country code.| +| options | [NumberFormatOptions](#numberformatoptions7) | Yes | Number formatting option, for example, country code. | **Return value** | Type | Description | | --------------------- | ------------------------------------------- | -| Promise<string> | Promise used to return the result.| +| Promise<string> | Promise used to return the result. | **Example** @@ -459,11 +459,11 @@ The phone number must match the specified country code. For example, for a China **Parameters** -| Name | Type | Mandatory| Description | +| Name | Type | Mandatory | Description | | ----------- | --------------------------- | ---- | ----------------------------------------------------- | | phoneNumber | string | Yes | Phone number. | | countryCode | string | Yes | Country code, for example, **CN** (China). All country codes are supported. | -| callback | AsyncCallback<string> | Yes | Callback used to return the result.| +| callback | AsyncCallback<string> | Yes | Callback used to return the result. | **Example** @@ -490,16 +490,16 @@ All country codes are supported. **Parameters** -| Name | Type | Mandatory| Description | +| Name | Type | Mandatory | Description | | ----------- | ------ | ---- | ---------------------------------------- | | phoneNumber | string | Yes | Phone number. | -| countryCode | string | Yes | Country code, for example, **CN** (China). All country codes are supported.| +| countryCode | string | Yes | Country code, for example, **CN** (China). All country codes are supported. | **Return value** | Type | Description | | --------------------- | ------------------------------------------------------------ | -| Promise<string> | Promise used to return the result.| +| Promise<string> | Promise used to return the result. | **Example** @@ -520,7 +520,7 @@ Provides an option for determining whether a call is a video call. **System capability**: SystemCapability.Telephony.CallManager -| Name| Type | Mandatory| Description | +| Name| Type | Mandatory | Description | | ------ | ------- | ---- | ------------------------------------------------------------ | | extras | boolean | No | Indication of a video call.
- **true**: video call
- **false** (default): voice call| @@ -535,7 +535,7 @@ Enumerates call states. | CALL_STATE_UNKNOWN | -1 | The call status fails to be obtained and is unknown. | | CALL_STATE_IDLE | 0 | No call is in progress. | | CALL_STATE_RINGING | 1 | The call is in the ringing or waiting state. | -| CALL_STATE_OFFHOOK | 2 | At least one call is in dialing, active, or on hold, and no new incoming call is ringing or waiting.| +| CALL_STATE_OFFHOOK | 2 | At least one call is in dialing, active, or on hold, and no new incoming call is ringing or waiting. | ## EmergencyNumberOptions7+ @@ -543,7 +543,7 @@ Provides an option for determining whether a number is an emergency number for t **System capability**: SystemCapability.Telephony.CallManager -| Name| Type | Mandatory| Description | +| Name| Type | Mandatory | Description | | ------ | ------ | ---- | ---------------------------------------------- | | slotId | number | No | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2| @@ -553,6 +553,6 @@ Provides an option for number formatting. **System capability**: SystemCapability.Telephony.CallManager -| Name | Type | Mandatory| Description | +| Name | Type | Mandatory | Description | | ----------- | ------ | ---- | ---------------------------------------------------------- | -| countryCode | string | No | Country code, for example, **CN** (China). All country codes are supported. The default value is **CN**.| +| countryCode | string | No | Country code, for example, **CN** (China). All country codes are supported. The default value is **CN**. |