Build 1.0_r1(from source)

com.android.internal.telephony.gsm
Interface ISms

All Superinterfaces:
IInterface
All Known Implementing Classes:
ISms.Stub

public interface ISms
extends IInterface

Interface for applications to access the SIM phone book.

The following code snippet demonstrates a static method to retrieve the ISimSms interface from Android:

private static ISimSms getSimSmsInterface()
            throws DeadObjectException {
    IServiceManager sm = ServiceManagerNative.getDefault();
    ISimSms ss;
    ss = ISimSms.Stub.asInterface(sm.getService("isms"));
    return ss;
}
 


Nested Class Summary
static class ISms.Stub
          Local-side IPC implementation stub class.
 
Method Summary
 boolean copyMessageToSimEf(int status, byte[] pdu, byte[] smsc)
          Copy a raw SMS PDU to the SIM.
 List<com.android.internal.telephony.gsm.SmsRawData> getAllMessagesFromSimEf()
          Retrieves all messages currently stored on SIM.
 void sendMultipartText(String destinationAddress, String scAddress, List<String> parts, List<PendingIntent> sentIntents, List<PendingIntent> deliveryIntents)
          Send a multi-part text based SMS.
 void sendRawPdu(byte[] smsc, byte[] pdu, PendingIntent sentIntent, PendingIntent deliveryIntent)
          Send a SMS
 boolean updateMessageOnSimEf(int messageIndex, int newStatus, byte[] pdu)
          Update the specified message on the SIM.
 
Methods inherited from interface android.os.IInterface
asBinder
 

Method Detail

getAllMessagesFromSimEf

List<com.android.internal.telephony.gsm.SmsRawData> getAllMessagesFromSimEf()
                                                                            throws RemoteException
Retrieves all messages currently stored on SIM.

Returns:
list of SmsRawData of all sms on SIM
Throws:
RemoteException

updateMessageOnSimEf

boolean updateMessageOnSimEf(int messageIndex,
                             int newStatus,
                             byte[] pdu)
                             throws RemoteException
Update the specified message on the SIM.

Parameters:
messageIndex - record index of message to update
newStatus - 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
Returns:
success or not
Throws:
RemoteException

copyMessageToSimEf

boolean copyMessageToSimEf(int status,
                           byte[] pdu,
                           byte[] smsc)
                           throws RemoteException
Copy a raw SMS PDU to the SIM.

Parameters:
pdu - the raw PDU to store
status - message status (STATUS_ON_SIM_READ, STATUS_ON_SIM_UNREAD, STATUS_ON_SIM_SENT, STATUS_ON_SIM_UNSENT)
Returns:
success or not
Throws:
RemoteException

sendRawPdu

void sendRawPdu(byte[] smsc,
                byte[] pdu,
                PendingIntent sentIntent,
                PendingIntent deliveryIntent)
                throws RemoteException
Send a SMS

Parameters:
smsc - the SMSC to send the message through, or NULL for the defatult SMSC
pdu - the raw PDU to send
sentIntent - if not NULL this Intent 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.
deliveryIntent - if not NULL this Intent is broadcast when the message is delivered to the recipient. The raw pdu of the status report is in the extended data ("pdu").
Throws:
RemoteException

sendMultipartText

void sendMultipartText(String destinationAddress,
                       String scAddress,
                       List<String> parts,
                       List<PendingIntent> sentIntents,
                       List<PendingIntent> deliveryIntents)
                       throws RemoteException
Send a multi-part text based SMS.

Parameters:
destinationAddress - the address to send the message to
scAddress - is the service center address or null to use the current default SMSC
parts - an ArrayList of strings that, in order, comprise the original message
sentIntents - if not null, an ArrayList of PendingIntents (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.
deliveryIntents - if not null, an ArrayList of PendingIntents (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").
Throws:
RemoteException

Build 1.0_r1(from source)

Please submit a feedback, bug or feature