CarrierMessagingService
abstract class CarrierMessagingService : Service
kotlin.Any | ||||
↳ | android.content.Context | |||
↳ | android.content.ContextWrapper | |||
↳ | android.app.Service | |||
↳ | android.service.carrier.CarrierMessagingService |
A service that receives calls from the system when new SMS and MMS are sent or received.
To extend this class, you must declare the service in your manifest file with the android.Manifest.permission#BIND_CARRIER_SERVICES
permission and include an intent filter with the SERVICE_INTERFACE
action. For example:
<service android:name=".MyMessagingService" android:label="@string/service_name" android:permission="android.permission.BIND_CARRIER_SERVICES"> <intent-filter> <action android:name="android.service.carrier.CarrierMessagingService" /> </intent-filter> </service>
Summary
Nested classes | |
---|---|
abstract |
A callback interface used to provide results asynchronously. |
The result of sending an MMS. |
|
The result of sending a multipart SMS. |
|
The result of sending an SMS. |
Constants | |
---|---|
static Int |
MMS downloading failed due to an unspecified issue. |
static Int |
The carrier-dependent configuration values could not be loaded. |
static Int |
Data is disabled for the MMS APN. |
static Int |
An error occurred during the HTTP client setup. |
static Int |
The subscription id for the download is inactive. |
static Int |
ApnException occurred during MMS network setup. |
static Int |
The subscription id for the download is invalid. |
static Int |
An I/O error occurred reading the PDU. |
static Int |
MMS is disabled by a carrier. |
static Int |
There is neither Wi-Fi nor mobile data network. |
static Int |
An error occurred while retrying downloading the MMS. |
static Int |
An error occurred during the MMS connection setup. |
static Int |
Unspecific MMS error occurred during download. |
static Int |
Successfully downloaded an MMS message. |
static Int |
MMS downloading failed. |
static Int |
The default bitmask value passed to the callback of |
static Int |
Used to set the flag in the bitmask passed to the callback of |
static Int |
Used to set the flag in the bitmask passed to the callback of |
static Int |
Flag to request SMS delivery status report. |
static Int |
SMS/MMS sending failed due to an unspecified issue. |
static Int |
The carrier-dependent configuration values could not be loaded. |
static Int |
Data is disabled for the MMS APN. |
static Int |
An error occurred during the HTTP client setup. |
static Int |
The subscription id for the send is inactive. |
static Int |
ApnException occurred during MMS network setup. |
static Int |
The subscription id for the send is invalid. |
static Int |
An I/O error occurred reading the PDU. |
static Int |
MMS is disabled by a carrier. |
static Int |
There is neither Wi-Fi nor mobile data network. |
static Int |
An error occurred while retrying sending the MMS. |
static Int |
An error occurred during the MMS connection setup. |
static Int |
Unspecific MMS error occurred during send. |
static Int |
Indicates that an SMS or MMS message was successfully sent. |
static Int |
Failed because the operation was cancelled. |
static Int |
Failed because of an encoding error. |
static Int |
Failed because FDN is enabled. |
static Int |
Generic failure cause. |
static Int |
Failed because we reached the sending queue limit. |
static Int |
Failed because service is currently unavailable. |
static Int |
Failed because no pdu provided. |
static Int |
Failed because the user has denied this app ever send premium short codes. |
static Int |
Failed because user denied the sending of this short code. |
static Int |
Failed because of invalid arguments. |
static Int |
Failed because of an invalid smsc address |
static Int |
Failed because the sms format is not valid. |
static Int |
Failed because of an invalid state. |
static Int |
Failed because of a network error. |
static Int |
Failed because of network rejection. |
static Int |
Failed because the operation is not allowed. |
static Int |
Failed because the request is not supported. |
static Int |
Failed sending during an emergency call. |
static Int |
Failed to send an sms retry. |
static Int |
SMS/MMS sending failed. |
static String |
The |
Inherited constants | |
---|---|
Public constructors | |
---|---|
Public methods | |
---|---|
open IBinder? |
Return the communication channel to the service. |
open Unit |
onDownloadMms(contentUri: Uri, subId: Int, location: Uri, callback: CarrierMessagingService.ResultCallback<Int!>) Override this method to download MMSs received. |
open Unit |
onFilterSms(pdu: MessagePdu, format: String, destPort: Int, subId: Int, callback: CarrierMessagingService.ResultCallback<Boolean!>) Override this method to filter inbound SMS messages. |
open Unit |
onReceiveTextSms(pdu: MessagePdu, format: String, destPort: Int, subId: Int, callback: CarrierMessagingService.ResultCallback<Int!>) Override this method to filter inbound SMS messages. |
open Unit |
onSendDataSms(data: ByteArray, subId: Int, destAddress: String, destPort: Int, callback: CarrierMessagingService.ResultCallback<CarrierMessagingService.SendSmsResult!>) Override this method to intercept binary SMSs sent from the device. |
open Unit |
onSendDataSms(data: ByteArray, subId: Int, destAddress: String, destPort: Int, sendSmsFlag: Int, callback: CarrierMessagingService.ResultCallback<CarrierMessagingService.SendSmsResult!>) Override this method to intercept binary SMSs sent from the device. |
open Unit |
onSendMms(pduUri: Uri, subId: Int, location: Uri?, callback: CarrierMessagingService.ResultCallback<CarrierMessagingService.SendMmsResult!>) Override this method to intercept MMSs sent from the device. |
open Unit |
onSendMultipartTextSms(parts: MutableList<String!>, subId: Int, destAddress: String, callback: CarrierMessagingService.ResultCallback<CarrierMessagingService.SendMultipartSmsResult!>) Override this method to intercept long SMSs sent from the device. |
open Unit |
onSendMultipartTextSms(parts: MutableList<String!>, subId: Int, destAddress: String, sendSmsFlag: Int, callback: CarrierMessagingService.ResultCallback<CarrierMessagingService.SendMultipartSmsResult!>) Override this method to intercept long SMSs sent from the device. |
open Unit |
onSendTextSms(text: String, subId: Int, destAddress: String, callback: CarrierMessagingService.ResultCallback<CarrierMessagingService.SendSmsResult!>) Override this method to intercept text SMSs sent from the device. |
open Unit |
onSendTextSms(text: String, subId: Int, destAddress: String, sendSmsFlag: Int, callback: CarrierMessagingService.ResultCallback<CarrierMessagingService.SendSmsResult!>) Override this method to intercept text SMSs sent from the device. |
Inherited functions | |
---|---|
Constants
DOWNLOAD_STATUS_ERROR
static val DOWNLOAD_STATUS_ERROR: Int
MMS downloading failed due to an unspecified issue. Downloading will not be retried via the carrier network.
Maps to SmsManager.MMR_ERROR_UNSPECIFIED.
Value: 2
DOWNLOAD_STATUS_MMS_ERROR_CONFIGURATION_ERROR
static val DOWNLOAD_STATUS_MMS_ERROR_CONFIGURATION_ERROR: Int
The carrier-dependent configuration values could not be loaded.
Value: 606
See Also
DOWNLOAD_STATUS_MMS_ERROR_DATA_DISABLED
static val DOWNLOAD_STATUS_MMS_ERROR_DATA_DISABLED: Int
Data is disabled for the MMS APN.
Value: 610
See Also
DOWNLOAD_STATUS_MMS_ERROR_HTTP_FAILURE
static val DOWNLOAD_STATUS_MMS_ERROR_HTTP_FAILURE: Int
An error occurred during the HTTP client setup.
Value: 603
See Also
DOWNLOAD_STATUS_MMS_ERROR_INACTIVE_SUBSCRIPTION
static val DOWNLOAD_STATUS_MMS_ERROR_INACTIVE_SUBSCRIPTION: Int
The subscription id for the download is inactive.
Value: 609
See Also
DOWNLOAD_STATUS_MMS_ERROR_INVALID_APN
static val DOWNLOAD_STATUS_MMS_ERROR_INVALID_APN: Int
ApnException occurred during MMS network setup.
Value: 601
See Also
DOWNLOAD_STATUS_MMS_ERROR_INVALID_SUBSCRIPTION_ID
static val DOWNLOAD_STATUS_MMS_ERROR_INVALID_SUBSCRIPTION_ID: Int
The subscription id for the download is invalid.
Value: 608
See Also
DOWNLOAD_STATUS_MMS_ERROR_IO_ERROR
static val DOWNLOAD_STATUS_MMS_ERROR_IO_ERROR: Int
An I/O error occurred reading the PDU.
Value: 604
See Also
DOWNLOAD_STATUS_MMS_ERROR_MMS_DISABLED_BY_CARRIER
static val DOWNLOAD_STATUS_MMS_ERROR_MMS_DISABLED_BY_CARRIER: Int
MMS is disabled by a carrier.
Value: 611
See Also
DOWNLOAD_STATUS_MMS_ERROR_NO_DATA_NETWORK
static val DOWNLOAD_STATUS_MMS_ERROR_NO_DATA_NETWORK: Int
There is neither Wi-Fi nor mobile data network.
Value: 607
See Also
DOWNLOAD_STATUS_MMS_ERROR_RETRY
static val DOWNLOAD_STATUS_MMS_ERROR_RETRY: Int
An error occurred while retrying downloading the MMS.
Value: 605
See Also
DOWNLOAD_STATUS_MMS_ERROR_UNABLE_CONNECT_MMS
static val DOWNLOAD_STATUS_MMS_ERROR_UNABLE_CONNECT_MMS: Int
An error occurred during the MMS connection setup.
Value: 602
See Also
DOWNLOAD_STATUS_MMS_ERROR_UNSPECIFIED
static val DOWNLOAD_STATUS_MMS_ERROR_UNSPECIFIED: Int
Unspecific MMS error occurred during download.
Value: 600
See Also
DOWNLOAD_STATUS_OK
static val DOWNLOAD_STATUS_OK: Int
Successfully downloaded an MMS message.
Value: 0
DOWNLOAD_STATUS_RETRY_ON_CARRIER_NETWORK
static val DOWNLOAD_STATUS_RETRY_ON_CARRIER_NETWORK: Int
MMS downloading failed. We should retry via the carrier network.
Value: 1
RECEIVE_OPTIONS_DEFAULT
static val RECEIVE_OPTIONS_DEFAULT: Int
The default bitmask value passed to the callback of onReceiveTextSms
with all RECEIVE_OPTIONS_x
flags cleared to indicate that the message should be kept and a new message notification should be shown.
Value: 0
RECEIVE_OPTIONS_DROP
static val RECEIVE_OPTIONS_DROP: Int
Used to set the flag in the bitmask passed to the callback of onReceiveTextSms
to indicate that the inbound SMS should be dropped.
Value: 1
RECEIVE_OPTIONS_SKIP_NOTIFY_WHEN_CREDENTIAL_PROTECTED_STORAGE_UNAVAILABLE
static val RECEIVE_OPTIONS_SKIP_NOTIFY_WHEN_CREDENTIAL_PROTECTED_STORAGE_UNAVAILABLE: Int
Used to set the flag in the bitmask passed to the callback of onReceiveTextSms
to indicate that a new message notification should not be shown to the user when the credential-encrypted storage of the device is not available before the user unlocks the phone. It is only applicable to devices that support file-based encryption.
Value: 2
SEND_FLAG_REQUEST_DELIVERY_STATUS
static val SEND_FLAG_REQUEST_DELIVERY_STATUS: Int
Flag to request SMS delivery status report.
Value: 1
SEND_STATUS_ERROR
static val SEND_STATUS_ERROR: Int
SMS/MMS sending failed due to an unspecified issue. Sending will not be retried via the carrier network.
Maps to SmsManager.RESULT_RIL_GENERIC_FAILURE for SMS and SmsManager.MMS_ERROR_UNSPECIFIED for MMS.
Value: 2
SEND_STATUS_MMS_ERROR_CONFIGURATION_ERROR
static val SEND_STATUS_MMS_ERROR_CONFIGURATION_ERROR: Int
The carrier-dependent configuration values could not be loaded.
Value: 406
See Also
SEND_STATUS_MMS_ERROR_DATA_DISABLED
static val SEND_STATUS_MMS_ERROR_DATA_DISABLED: Int
Data is disabled for the MMS APN.
Value: 410
See Also
SEND_STATUS_MMS_ERROR_HTTP_FAILURE
static val SEND_STATUS_MMS_ERROR_HTTP_FAILURE: Int
An error occurred during the HTTP client setup.
Value: 403
See Also
SEND_STATUS_MMS_ERROR_INACTIVE_SUBSCRIPTION
static val SEND_STATUS_MMS_ERROR_INACTIVE_SUBSCRIPTION: Int
The subscription id for the send is inactive.
Value: 409
See Also
SEND_STATUS_MMS_ERROR_INVALID_APN
static val SEND_STATUS_MMS_ERROR_INVALID_APN: Int
ApnException occurred during MMS network setup.
Value: 401
See Also
SEND_STATUS_MMS_ERROR_INVALID_SUBSCRIPTION_ID
static val SEND_STATUS_MMS_ERROR_INVALID_SUBSCRIPTION_ID: Int
The subscription id for the send is invalid.
Value: 408
See Also
SEND_STATUS_MMS_ERROR_IO_ERROR
static val SEND_STATUS_MMS_ERROR_IO_ERROR: Int
An I/O error occurred reading the PDU.
Value: 404
See Also
SEND_STATUS_MMS_ERROR_MMS_DISABLED_BY_CARRIER
static val SEND_STATUS_MMS_ERROR_MMS_DISABLED_BY_CARRIER: Int
MMS is disabled by a carrier.
Value: 411
See Also
SEND_STATUS_MMS_ERROR_NO_DATA_NETWORK
static val SEND_STATUS_MMS_ERROR_NO_DATA_NETWORK: Int
There is neither Wi-Fi nor mobile data network.
Value: 407
See Also
SEND_STATUS_MMS_ERROR_RETRY
static val SEND_STATUS_MMS_ERROR_RETRY: Int
An error occurred while retrying sending the MMS.
Value: 405
See Also
SEND_STATUS_MMS_ERROR_UNABLE_CONNECT_MMS
static val SEND_STATUS_MMS_ERROR_UNABLE_CONNECT_MMS: Int
An error occurred during the MMS connection setup.
Value: 402
See Also
SEND_STATUS_MMS_ERROR_UNSPECIFIED
static val SEND_STATUS_MMS_ERROR_UNSPECIFIED: Int
Unspecific MMS error occurred during send.
Value: 400
See Also
SEND_STATUS_OK
static val SEND_STATUS_OK: Int
Indicates that an SMS or MMS message was successfully sent.
Value: 0
SEND_STATUS_RESULT_CANCELLED
static val SEND_STATUS_RESULT_CANCELLED: Int
Failed because the operation was cancelled.
Value: 215
See Also
SEND_STATUS_RESULT_ENCODING_ERROR
static val SEND_STATUS_RESULT_ENCODING_ERROR: Int
Failed because of an encoding error.
Value: 212
See Also
SEND_STATUS_RESULT_ERROR_FDN_CHECK_FAILURE
static val SEND_STATUS_RESULT_ERROR_FDN_CHECK_FAILURE: Int
Failed because FDN is enabled.
Value: 204
See Also
SEND_STATUS_RESULT_ERROR_GENERIC_FAILURE
static val SEND_STATUS_RESULT_ERROR_GENERIC_FAILURE: Int
Generic failure cause.
Value: 200
See Also
SEND_STATUS_RESULT_ERROR_LIMIT_EXCEEDED
static val SEND_STATUS_RESULT_ERROR_LIMIT_EXCEEDED: Int
Failed because we reached the sending queue limit.
Value: 203
See Also
SEND_STATUS_RESULT_ERROR_NO_SERVICE
static val SEND_STATUS_RESULT_ERROR_NO_SERVICE: Int
Failed because service is currently unavailable.
Value: 202
See Also
SEND_STATUS_RESULT_ERROR_NULL_PDU
static val SEND_STATUS_RESULT_ERROR_NULL_PDU: Int
Failed because no pdu provided.
Value: 201
See Also
SEND_STATUS_RESULT_ERROR_SHORT_CODE_NEVER_ALLOWED
static val SEND_STATUS_RESULT_ERROR_SHORT_CODE_NEVER_ALLOWED: Int
Failed because the user has denied this app ever send premium short codes.
Value: 206
See Also
SEND_STATUS_RESULT_ERROR_SHORT_CODE_NOT_ALLOWED
static val SEND_STATUS_RESULT_ERROR_SHORT_CODE_NOT_ALLOWED: Int
Failed because user denied the sending of this short code.
Value: 205
See Also
SEND_STATUS_RESULT_INVALID_ARGUMENTS
static val SEND_STATUS_RESULT_INVALID_ARGUMENTS: Int
Failed because of invalid arguments.
Value: 208
See Also
SEND_STATUS_RESULT_INVALID_SMSC_ADDRESS
static val SEND_STATUS_RESULT_INVALID_SMSC_ADDRESS: Int
Failed because of an invalid smsc address
Value: 213
See Also
SEND_STATUS_RESULT_INVALID_SMS_FORMAT
static val SEND_STATUS_RESULT_INVALID_SMS_FORMAT: Int
Failed because the sms format is not valid.
Value: 210
See Also
SEND_STATUS_RESULT_INVALID_STATE
static val SEND_STATUS_RESULT_INVALID_STATE: Int
Failed because of an invalid state.
Value: 209
See Also
SEND_STATUS_RESULT_NETWORK_ERROR
static val SEND_STATUS_RESULT_NETWORK_ERROR: Int
Failed because of a network error.
Value: 211
See Also
SEND_STATUS_RESULT_NETWORK_REJECT
static val SEND_STATUS_RESULT_NETWORK_REJECT: Int
Failed because of network rejection.
Value: 207
See Also
SEND_STATUS_RESULT_OPERATION_NOT_ALLOWED
static val SEND_STATUS_RESULT_OPERATION_NOT_ALLOWED: Int
Failed because the operation is not allowed.
Value: 214
See Also
SEND_STATUS_RESULT_REQUEST_NOT_SUPPORTED
static val SEND_STATUS_RESULT_REQUEST_NOT_SUPPORTED: Int
Failed because the request is not supported.
Value: 216
See Also
SEND_STATUS_RESULT_SMS_BLOCKED_DURING_EMERGENCY
static val SEND_STATUS_RESULT_SMS_BLOCKED_DURING_EMERGENCY: Int
Failed sending during an emergency call.
Value: 217
See Also
SEND_STATUS_RESULT_SMS_SEND_RETRY_FAILED
static val SEND_STATUS_RESULT_SMS_SEND_RETRY_FAILED: Int
Failed to send an sms retry.
Value: 218
See Also
SEND_STATUS_RETRY_ON_CARRIER_NETWORK
static val SEND_STATUS_RETRY_ON_CARRIER_NETWORK: Int
SMS/MMS sending failed. We should retry via the carrier network.
Value: 1
SERVICE_INTERFACE
static val SERVICE_INTERFACE: String
The android.content.Intent
that must be declared as handled by the service.
Value: "android.service.carrier.CarrierMessagingService"
Public constructors
CarrierMessagingService
CarrierMessagingService()
Public methods
onBind
open fun onBind(intent: Intent): IBinder?
Return the communication channel to the service. May return null if clients can not bind to the service. The returned android.os.IBinder
is usually for a complex interface that has been described using aidl.
Note that unlike other application components, calls on to the IBinder interface returned here may not happen on the main thread of the process. More information about the main thread can be found in Processes and Threads.
Parameters | |
---|---|
intent |
Intent: This value cannot be null . |
Return | |
---|---|
IBinder? |
This value may be null . |
onDownloadMms
open fun onDownloadMms(
contentUri: Uri,
subId: Int,
location: Uri,
callback: CarrierMessagingService.ResultCallback<Int!>
): Unit
Override this method to download MMSs received.
Parameters | |
---|---|
contentUri |
Uri: the content provider URI of the PDU to be downloaded. This value cannot be null . |
subId |
Int: SMS subscription ID of the SIM |
location |
Uri: the URI of the message to be downloaded. This value cannot be null . |
callback |
CarrierMessagingService.ResultCallback<Int!>: result callback. Call with a status code which is one of DOWNLOAD_STATUS_OK , DOWNLOAD_STATUS_RETRY_ON_CARRIER_NETWORK , or DOWNLOAD_STATUS_ERROR . This value cannot be null . |
onFilterSms
open funonFilterSms(
pdu: MessagePdu,
format: String,
destPort: Int,
subId: Int,
callback: CarrierMessagingService.ResultCallback<Boolean!>
): Unit
Deprecated: Use onReceiveTextSms
instead.
Override this method to filter inbound SMS messages.
Parameters | |
---|---|
pdu |
MessagePdu: the PDUs of the message This value cannot be null . |
format |
String: the format of the PDUs, typically "3gpp" or "3gpp2" This value cannot be null . |
destPort |
Int: the destination port of a binary SMS, this will be -1 for text SMS |
subId |
Int: SMS subscription ID of the SIM |
callback |
CarrierMessagingService.ResultCallback<Boolean!>: result callback. Call with true to keep an inbound SMS message and deliver to SMS apps, and false to drop the message. This value cannot be null . |
onReceiveTextSms
open fun onReceiveTextSms(
pdu: MessagePdu,
format: String,
destPort: Int,
subId: Int,
callback: CarrierMessagingService.ResultCallback<Int!>
): Unit
Override this method to filter inbound SMS messages.
This method will be called once for every incoming text SMS. You can invoke the callback with a bitmask to tell the platform how to handle the SMS. For a SMS received on a file-based encryption capable device while the credential-encrypted storage is not available, this method will be called for the second time when the credential-encrypted storage becomes available after the user unlocks the phone, if the bit RECEIVE_OPTIONS_DROP
is not set when invoking the callback.
Parameters | |
---|---|
pdu |
MessagePdu: the PDUs of the message This value cannot be null . |
format |
String: the format of the PDUs, typically "3gpp" or "3gpp2" This value cannot be null . |
destPort |
Int: the destination port of a binary SMS, this will be -1 for text SMS |
subId |
Int: SMS subscription ID of the SIM |
callback |
CarrierMessagingService.ResultCallback<Int!>: result callback. Call with a bitmask integer to indicate how the incoming text SMS should be handled by the platform. Use RECEIVE_OPTIONS_DROP and RECEIVE_OPTIONS_SKIP_NOTIFY_WHEN_CREDENTIAL_PROTECTED_STORAGE_UNAVAILABLE to set the flags in the bitmask. This value cannot be null . |
onSendDataSms
open funonSendDataSms(
data: ByteArray,
subId: Int,
destAddress: String,
destPort: Int,
callback: CarrierMessagingService.ResultCallback<CarrierMessagingService.SendSmsResult!>
): Unit
Deprecated: Override #onSendDataSms below instead.
Override this method to intercept binary SMSs sent from the device.
Parameters | |
---|---|
data |
ByteArray: the binary content This value cannot be null . |
subId |
Int: SMS subscription ID of the SIM |
destAddress |
String: phone number of the recipient of the message This value cannot be null . |
destPort |
Int: the destination port |
callback |
CarrierMessagingService.ResultCallback<CarrierMessagingService.SendSmsResult!>: result callback. Call with a SendSmsResult . This value cannot be null . |
onSendDataSms
open fun onSendDataSms(
data: ByteArray,
subId: Int,
destAddress: String,
destPort: Int,
sendSmsFlag: Int,
callback: CarrierMessagingService.ResultCallback<CarrierMessagingService.SendSmsResult!>
): Unit
Override this method to intercept binary SMSs sent from the device.
Parameters | |
---|---|
data |
ByteArray: the binary content This value cannot be null . |
subId |
Int: SMS subscription ID of the SIM |
destAddress |
String: phone number of the recipient of the message This value cannot be null . |
destPort |
Int: the destination port |
sendSmsFlag |
Int: Flag for sending SMS. Acceptable values are 0 and SEND_FLAG_REQUEST_DELIVERY_STATUS . |
callback |
CarrierMessagingService.ResultCallback<CarrierMessagingService.SendSmsResult!>: result callback. Call with a SendSmsResult . This value cannot be null . |
onSendMms
open fun onSendMms(
pduUri: Uri,
subId: Int,
location: Uri?,
callback: CarrierMessagingService.ResultCallback<CarrierMessagingService.SendMmsResult!>
): Unit
Override this method to intercept MMSs sent from the device.
Parameters | |
---|---|
pduUri |
Uri: the content provider URI of the PDU to send This value cannot be null . |
subId |
Int: SMS subscription ID of the SIM |
location |
Uri?: the optional URI to send this MMS PDU. If this is {code null}, the PDU should be sent to the default MMSC URL. |
callback |
CarrierMessagingService.ResultCallback<CarrierMessagingService.SendMmsResult!>: result callback. Call with a SendMmsResult . This value cannot be null . |
onSendMultipartTextSms
open funonSendMultipartTextSms(
parts: MutableList<String!>,
subId: Int,
destAddress: String,
callback: CarrierMessagingService.ResultCallback<CarrierMessagingService.SendMultipartSmsResult!>
): Unit
Deprecated: Override #onSendMultipartTextSms below instead.
Override this method to intercept long SMSs sent from the device.
Parameters | |
---|---|
parts |
MutableList<String!>: a List of the message parts This value cannot be null . |
subId |
Int: SMS subscription ID of the SIM |
destAddress |
String: phone number of the recipient of the message This value cannot be null . |
callback |
CarrierMessagingService.ResultCallback<CarrierMessagingService.SendMultipartSmsResult!>: result callback. Call with a SendMultipartSmsResult . This value cannot be null . |
onSendMultipartTextSms
open fun onSendMultipartTextSms(
parts: MutableList<String!>,
subId: Int,
destAddress: String,
sendSmsFlag: Int,
callback: CarrierMessagingService.ResultCallback<CarrierMessagingService.SendMultipartSmsResult!>
): Unit
Override this method to intercept long SMSs sent from the device.
Parameters | |
---|---|
parts |
MutableList<String!>: a List of the message parts This value cannot be null . |
subId |
Int: SMS subscription ID of the SIM |
destAddress |
String: phone number of the recipient of the message This value cannot be null . |
sendSmsFlag |
Int: Flag for sending SMS. Acceptable values are 0 and SEND_FLAG_REQUEST_DELIVERY_STATUS . |
callback |
CarrierMessagingService.ResultCallback<CarrierMessagingService.SendMultipartSmsResult!>: result callback. Call with a SendMultipartSmsResult . This value cannot be null . |
onSendTextSms
open funonSendTextSms(
text: String,
subId: Int,
destAddress: String,
callback: CarrierMessagingService.ResultCallback<CarrierMessagingService.SendSmsResult!>
): Unit
Deprecated: Override #onSendTextSms below instead.
Override this method to intercept text SMSs sent from the device.
Parameters | |
---|---|
text |
String: the text to send This value cannot be null . |
subId |
Int: SMS subscription ID of the SIM |
destAddress |
String: phone number of the recipient of the message This value cannot be null . |
callback |
CarrierMessagingService.ResultCallback<CarrierMessagingService.SendSmsResult!>: result callback. Call with a SendSmsResult . This value cannot be null . |
onSendTextSms
open fun onSendTextSms(
text: String,
subId: Int,
destAddress: String,
sendSmsFlag: Int,
callback: CarrierMessagingService.ResultCallback<CarrierMessagingService.SendSmsResult!>
): Unit
Override this method to intercept text SMSs sent from the device.
Parameters | |
---|---|
text |
String: the text to send This value cannot be null . |
subId |
Int: SMS subscription ID of the SIM |
destAddress |
String: phone number of the recipient of the message This value cannot be null . |
sendSmsFlag |
Int: Flag for sending SMS. Acceptable values are 0 and SEND_FLAG_REQUEST_DELIVERY_STATUS . |
callback |
CarrierMessagingService.ResultCallback<CarrierMessagingService.SendSmsResult!>: result callback. Call with a SendSmsResult . This value cannot be null . |