| callback | AsyncCallback<boolean> | Yes| Callback used to return the result: <br/> - **true**: A call is in progress. <br/> - **false**: No call is in progress. |
| callback | AsyncCallback<boolean> | Yes | Callback used to return the result.<br>- **true**: A call is in progress.<br>- **false**: No call is in progress.|
**Example**
...
...
@@ -133,9 +188,9 @@ Checks whether a call is in progress. This function uses a promise to return the
| callback | AsyncCallback<boolean> | Yes| Callback used to return the result.<br/> - **true**: The called number is an emergency number. <br/>- **false**: The called number is not an emergency number.|
| phoneNumber | string | Yes | Phone number. |
| callback | AsyncCallback<boolean> | Yes | Callback used to return the result.<br>- **true**: The called number is an emergency number.<br>- **false**: The called number is not an emergency number.|
**Example**
...
...
@@ -233,11 +307,11 @@ Checks whether the call number of the SIM card in the specified slot is an emerg
| options | EmergencyNumberOptions | Yes| Emergency number options defined in [EmergencyNumberOptions](#EmergencyNumberOptions).|
| callback | AsyncCallback<boolean> | Yes| Callback used to return the result.<br/> - **true**: The called number is an emergency number. <br/>- **false**: The called number is not an emergency number.|
| phoneNumber | string | Yes | Phone number. |
| options | EmergencyNumberOptions | Yes| Emergency number options defined in [EmergencyNumberOptions](#EmergencyNumberOptions).|
| callback | AsyncCallback<boolean> | Yes | Callback used to return the result.<br>- **true**: The called number is an emergency number.<br>- **false**: The called number is not an emergency number.|
**Example**
...
...
@@ -258,14 +332,14 @@ Checks whether the call number of the SIM card in the specified slot is an emerg
| CALL_STATE_UNKNOWN | -1 | The call status fails to be obtained and is unknown.<br/>**System capability**: SystemCapability.Telephony.CallManager|
| CALL_STATE_IDLE | 0 | No call is in progress.<br/>**System capability**: SystemCapability.Telephony.CallManager|
| CALL_STATE_RINGING | 1 | The call is in the ringing or waiting state.<br/>**System capability**: SystemCapability.Telephony.CallManager|
| CALL_STATE_OFFHOOK | 2 | At least one call is in dialing, active, or on hold, and no new incoming call is ringing or waiting.<br/>**System capability**: SystemCapability.Telephony.CallManager|
| CALL_STATE_UNKNOWN | -1 | The call status fails to be obtained and is unknown.<br>**System capability**: SystemCapability.Telephony.CallManager|
| CALL_STATE_IDLE | 0 | No call is in progress.<br>**System capability**: SystemCapability.Telephony.CallManager|
| CALL_STATE_RINGING | 1 | The call is in the ringing or waiting state.<br>**System capability**: SystemCapability.Telephony.CallManager|
| CALL_STATE_OFFHOOK | 2 | At least one call is in dialing, active, or on hold, and no new incoming call is ringing or waiting.<br>**System capability**: SystemCapability.Telephony.CallManager|
| options | [SendMessageOptions](#SendMessageOptions) | Yes| Options (including the callback) for sending an SMS message. For details, see [SendMessageOptions](#SendMessageOptions).|
| options | [SendMessageOptions](#SendMessageOptions) | Yes| Options (including the callback) for sending an SMS message. For details, see [SendMessageOptions](#SendMessageOptions).|
**Example**
...
...
@@ -118,9 +118,9 @@ Obtains the default slot of the SIM card used to send SMS messages. This functio
| hasReplyPath | boolean | Whether the received SMS contains **TP-Reply-Path**. The default value is **false**. <br/>**TP-Reply-Path**: the path in which the mobile phone can reply to the SMS message through the originating SMSC.|
| isEmailMessage | boolean | Whether the received SMS message is an email.|
| isReplaceMessage | boolean | Whether the received SMS message is a **replace short message**. The default value is **false**. <br/>For details, see section 9.2.3.9 in **3GPP TS 23.040**.|
| isSmsStatusReportMessage | boolean | Whether the received SMS message is an SMS delivery status report. The default value is **false**. <br/>SMS delivery status report: a message sent from the SMSC to show the current status of the SMS message you delivered.|
| pdu | Array<number> | PDU in the SMS message.|
| protocolId | number | ID of the protocol used for sending SMS messages.|
| scAddress | string | Address of the short message service center (SMSC).|
| scTimestamp | number | SMSC timestamp.|
| hasReplyPath | boolean | Whether the received SMS contains **TP-Reply-Path**. The default value is **false**.<br>**TP-Reply-Path**: the path in which the mobile phone can reply to the SMS message through the originating SMSC.|
| isReplaceMessage | boolean | Whether the received SMS message is a **replace short message**. The default value is **false**.<br>For details, see section 9.2.3.9 in **3GPP TS 23.040**.|
| isSmsStatusReportMessage | boolean | Whether the received SMS message is an SMS delivery status report. The default value is **false**.<br>**SMS-Status-Report**: a message sent from the SMSC to the mobile station to show the SMS message delivery status.|
| INSTANT_MESSAGE | 1 | Instant message, which is displayed immediately after being received.<br/>**System capability**: SystemCapability.Telephony.SmsMms|
| OPTIONAL_MESSAGE | 2 | Message stored in the device or SIM card.<br/>**System capability**: SystemCapability.Telephony.SmsMms|
| SIM_MESSAGE | 3 | Message containing SIM card information, which is to be stored in the SIM card.<br/>**System capability**: SystemCapability.Telephony.SmsMms|
| FORWARD_MESSAGE | 4 | Message to be forwarded to another device.<br/>**System capability**: SystemCapability.Telephony.SmsMms|
| INSTANT_MESSAGE | 1 | Instant message, which is displayed immediately after being received.<br>**System capability**: SystemCapability.Telephony.SmsMms|
| OPTIONAL_MESSAGE | 2 | Message stored in the device or SIM card.<br>**System capability**: SystemCapability.Telephony.SmsMms|
| SIM_MESSAGE | 3 | Message containing SIM card information, which is to be stored in the SIM card.<br>**System capability**: SystemCapability.Telephony.SmsMms|
| FORWARD_MESSAGE | 4 | Message to be forwarded to another device.<br>**System capability**: SystemCapability.Telephony.SmsMms|
| slotId | number | Yes| Slot ID of the SIM card used for sending SMS messages: <br/> - **0**: slot 1 <br/> - **1**: slot 2|
| destinationHost | string | Yes| Destination address of the SMS message.|
| content | string \| Array<number> | Yes| SMS message type. If the content is composed of character strings, the SMS message is a text message. If the content is composed of byte arrays, the SMS message is a data message.|
| serviceCenter | string | No| SMSC address. By default, the SMSC address in the SIM card is used.|
| destinationPort | number | No| Destination port of the SMS message. This parameter is mandatory only for a data message. Otherwise, it is optional.|
| sendCallback | AsyncCallback<[ISendShortMessageCallback](#ISendShortMessageCallback)> | No| Callback used to return the SMS message sending result. For details, see [ISendShortMessageCallback](#ISendShortMessageCallback).|
| deliveryCallback | AsyncCallback<[IDeliveryShortMessageCallback](#IDeliveryShortMessageCallback)> | No| Callback used to return the SMS message delivery report. For details, see [IDeliveryShortMessageCallback](#IDeliveryShortMessageCallback).|
| slotId | number | Yes | Slot ID of the SIM card used for sending SMS messages. <br>- **0**: card slot 1<br>- **1**: card slot 2 |
| destinationHost | string | Yes | Destination address of the SMS message. |
| content | string \| Array<number> | Yes| SMS message type. If the content is composed of character strings, the SMS message is a text message. If the content is composed of byte arrays, the SMS message is a data message.|
| serviceCenter | string | No | SMSC address. By default, the SMSC address in the SIM card is used. |
| destinationPort | number | No | Destination port of the SMS message. This parameter is mandatory only for a data message. Otherwise, it is optional. |
| sendCallback | AsyncCallback<[ISendShortMessageCallback](#ISendShortMessageCallback)> | No| Callback used to return the SMS message sending result. For details, see [ISendShortMessageCallback](#ISendShortMessageCallback).|
| deliveryCallback | AsyncCallback<[IDeliveryShortMessageCallback](#IDeliveryShortMessageCallback)> | No| Callback used to return the SMS message delivery report. For details, see [IDeliveryShortMessageCallback](#IDeliveryShortMessageCallback).|
| isLastPart | boolean | No| Whether this SMS message is the last part of a long SMS message. The value **true** indicates that this SMS message is the last part of a long SMS message, and value **false** indicates the opposite. The default value is **false**.|
| result | [SendSmsResult](#SendSmsResult) | Yes| SMS message sending result.|
| url | string | Yes| URI for storing sent SMS messages.|
| isLastPart | boolean | No| Whether this SMS message is the last part of a long SMS message. The value **true** indicates that this SMS message is the last part of a long SMS message, and value **false** indicates the opposite. The default value is **false**.|
| SEND_SMS_SUCCESS | 0 | SMS message sent successfully.|
| SEND_SMS_FAILURE_UNKNOWN | 1 | Failed to send the SMS message due to unknown reasons.|
| SEND_SMS_FAILURE_RADIO_OFF | 2 | Failed to send the SMS message because the modem is shut down.|
| SEND_SMS_SUCCESS | 0 | SMS message sent successfully.|
| SEND_SMS_FAILURE_UNKNOWN | 1 | Failed to send the SMS message due to unknown reasons.|
| SEND_SMS_FAILURE_RADIO_OFF | 2 | Failed to send the SMS message because the modem is shut down.|
| SEND_SMS_FAILURE_SERVICE_UNAVAILABLE | 3 | Failed to send the SMS message because the network is unavailable or SMS message sending or receiving is not supported.|