@Deprecated public final class SmsManager extends Object
Modifier and Type | Field and Description |
---|---|
static int |
RESULT_ERROR_GENERIC_FAILURE
Deprecated.
Use android.telephony.SmsManager.
|
static int |
RESULT_ERROR_NO_SERVICE
Deprecated.
Use android.telephony.SmsManager.
|
static int |
RESULT_ERROR_NULL_PDU
Deprecated.
Use android.telephony.SmsManager.
|
static int |
RESULT_ERROR_RADIO_OFF
Deprecated.
Use android.telephony.SmsManager.
|
static int |
STATUS_ON_SIM_FREE
Deprecated.
Use android.telephony.SmsManager.
|
static int |
STATUS_ON_SIM_READ
Deprecated.
Use android.telephony.SmsManager.
|
static int |
STATUS_ON_SIM_SENT
Deprecated.
Use android.telephony.SmsManager.
|
static int |
STATUS_ON_SIM_UNREAD
Deprecated.
Use android.telephony.SmsManager.
|
static int |
STATUS_ON_SIM_UNSENT
Deprecated.
Use android.telephony.SmsManager.
|
Modifier and Type | Method and Description |
---|---|
boolean |
copyMessageToSim(byte[] smsc,
byte[] pdu,
int status)
Deprecated.
Use android.telephony.SmsManager.
|
boolean |
deleteMessageFromSim(int messageIndex)
Deprecated.
Use android.telephony.SmsManager.
|
ArrayList<String> |
divideMessage(String text)
Deprecated.
Use android.telephony.SmsManager.
|
ArrayList<SmsMessage> |
getAllMessagesFromSim()
Deprecated.
Use android.telephony.SmsManager.
|
static SmsManager |
getDefault()
Deprecated.
Use android.telephony.SmsManager.
|
void |
sendDataMessage(String destinationAddress,
String scAddress,
short destinationPort,
byte[] data,
PendingIntent sentIntent,
PendingIntent deliveryIntent)
Deprecated.
Use android.telephony.SmsManager.
|
void |
sendMultipartTextMessage(String destinationAddress,
String scAddress,
ArrayList<String> parts,
ArrayList<PendingIntent> sentIntents,
ArrayList<PendingIntent> deliveryIntents)
Deprecated.
Use android.telephony.SmsManager.
|
void |
sendTextMessage(String destinationAddress,
String scAddress,
String text,
PendingIntent sentIntent,
PendingIntent deliveryIntent)
Deprecated.
Use android.telephony.SmsManager.
|
boolean |
updateMessageOnSim(int messageIndex,
int newStatus,
byte[] pdu)
Deprecated.
Use android.telephony.SmsManager.
|
@Deprecated public static final int STATUS_ON_SIM_FREE
@Deprecated public static final int STATUS_ON_SIM_READ
@Deprecated public static final int STATUS_ON_SIM_UNREAD
@Deprecated public static final int STATUS_ON_SIM_SENT
@Deprecated public static final int STATUS_ON_SIM_UNSENT
@Deprecated public static final int RESULT_ERROR_GENERIC_FAILURE
@Deprecated public static final int RESULT_ERROR_RADIO_OFF
@Deprecated public static final int RESULT_ERROR_NULL_PDU
@Deprecated public static final int RESULT_ERROR_NO_SERVICE
@Deprecated public static final SmsManager getDefault()
@Deprecated public final void sendTextMessage(String destinationAddress, String scAddress, String text, PendingIntent sentIntent, PendingIntent deliveryIntent)
destinationAddress
- the address to send the message toscAddress
- is the service center address or null to use
the current default SMSCtext
- the body of the message to sendsentIntent
- if not NULL this PendingIntent
is
broadcast when the message is successfully sent, or failed.
The result code will be Activity.RESULT_OK for success,
or one of these errors:
RESULT_ERROR_GENERIC_FAILURE
RESULT_ERROR_RADIO_OFF
RESULT_ERROR_NULL_PDU
.
The per-application based SMS control checks sentIntent. If sentIntent
is NULL the caller will be checked against all unknown applications,
which cause smaller number of SMS to be sent in checking period.
deliveryIntent
- if not NULL this PendingIntent
is
broadcast when the message is delivered to the recipient. The
raw pdu of the status report is in the extended data ("pdu").IllegalArgumentException
- if destinationAddress or text are empty@Deprecated public final ArrayList<String> divideMessage(String text)
text
- the original message. Must not be null.ArrayList
of strings that, in order,
comprise the original message@Deprecated public final void sendMultipartTextMessage(String destinationAddress, String scAddress, ArrayList<String> parts, ArrayList<PendingIntent> sentIntents, ArrayList<PendingIntent> deliveryIntents)
divideMessage
.destinationAddress
- the address to send the message toscAddress
- is the service center address or null to use
the current default SMSCparts
- an ArrayList
of strings that, in order,
comprise the original messagesentIntents
- if not null, an ArrayList
of
PendingIntent
s (one for each message part) that is
broadcast when the corresponding message part has been sent.
The result code will be Activity.RESULT_OK for success,
or one of these errors:
RESULT_ERROR_GENERIC_FAILURE
RESULT_ERROR_RADIO_OFF
RESULT_ERROR_NULL_PDU
.
The per-application based SMS control checks sentIntent. If sentIntent
is NULL the caller will be checked against all unknown applicaitons,
which cause smaller number of SMS to be sent in checking period.
deliveryIntents
- if not null, an ArrayList
of
PendingIntent
s (one for each message part) that is
broadcast when the corresponding message part has been delivered
to the recipient. The raw pdu of the status report is in the
extended data ("pdu").IllegalArgumentException
- if destinationAddress or data are empty@Deprecated public final void sendDataMessage(String destinationAddress, String scAddress, short destinationPort, byte[] data, PendingIntent sentIntent, PendingIntent deliveryIntent)
destinationAddress
- the address to send the message toscAddress
- is the service center address or null to use
the current default SMSCdestinationPort
- the port to deliver the message todata
- the body of the message to sendsentIntent
- if not NULL this PendingIntent
is
broadcast when the message is sucessfully sent, or failed.
The result code will be Activity.RESULT_OK for success,
or one of these errors:
RESULT_ERROR_GENERIC_FAILURE
RESULT_ERROR_RADIO_OFF
RESULT_ERROR_NULL_PDU
.
The per-application based SMS control checks sentIntent. If sentIntent
is NULL the caller will be checked against all unknown applicaitons,
which cause smaller number of SMS to be sent in checking period.
deliveryIntent
- if not NULL this PendingIntent
is
broadcast when the message is delivered to the recipient. The
raw pdu of the status report is in the extended data ("pdu").IllegalArgumentException
- if destinationAddress or data are empty@Deprecated public final boolean copyMessageToSim(byte[] smsc, byte[] pdu, int status)
smsc
- the SMSC for this message, or NULL for the default SMSCpdu
- the raw PDU to storestatus
- message status (STATUS_ON_SIM_READ, STATUS_ON_SIM_UNREAD,
STATUS_ON_SIM_SENT, STATUS_ON_SIM_UNSENT)@Deprecated public final boolean deleteMessageFromSim(int messageIndex)
messageIndex
- is the record index of the message on SIM@Deprecated public final boolean updateMessageOnSim(int messageIndex, int newStatus, byte[] pdu)
messageIndex
- record index of message to updatenewStatus
- new message status (STATUS_ON_SIM_READ,
STATUS_ON_SIM_UNREAD, STATUS_ON_SIM_SENT,
STATUS_ON_SIM_UNSENT, STATUS_ON_SIM_FREE)pdu
- the raw PDU to store@Deprecated public final ArrayList<SmsMessage> getAllMessagesFromSim()
ArrayList
of SmsMessage
objects