public class InboundSmsTracker extends Object
SMSDispatcher.SmsTracker
used for
outgoing messages.Constructor and Description |
---|
InboundSmsTracker(byte[] pdu,
long timestamp,
int destPort,
boolean is3gpp2,
boolean is3gpp2WapPdu,
String address,
String messageBody)
Create a tracker for a single-part SMS.
|
InboundSmsTracker(byte[] pdu,
long timestamp,
int destPort,
boolean is3gpp2,
String address,
int referenceNumber,
int sequenceNumber,
int messageCount,
boolean is3gpp2WapPdu,
String messageBody)
Create a tracker for a multi-part SMS.
|
InboundSmsTracker(Cursor cursor,
boolean isCurrentFormat3gpp2)
Create a new tracker from the row of the raw table pointed to by Cursor.
|
Modifier and Type | Method and Description |
---|---|
String |
getAddress() |
ContentValues |
getContentValues() |
String |
getDeleteWhere() |
String[] |
getDeleteWhereArgs() |
int |
getDestPort() |
String |
getFormat() |
int |
getIndexOffset()
Sequence numbers for concatenated messages start at 1.
|
String |
getMessageBody() |
int |
getMessageCount() |
byte[] |
getPdu() |
static int |
getRealDestPort(int destPort)
Get the port number, or -1 if there is no destination port.
|
int |
getReferenceNumber() |
int |
getSequenceNumber() |
long |
getTimestamp() |
boolean |
is3gpp2() |
void |
setDeleteWhere(String deleteWhere,
String[] deleteWhereArgs)
Update the values to delete all rows of the message from raw table.
|
String |
toString()
Returns a string representation of the object.
|
public InboundSmsTracker(byte[] pdu, long timestamp, int destPort, boolean is3gpp2, boolean is3gpp2WapPdu, String address, String messageBody)
pdu
- the message PDUtimestamp
- the message timestampdestPort
- the destination portis3gpp2
- true for 3GPP2 format; false for 3GPP formatis3gpp2WapPdu
- true for 3GPP2 format WAP PDU; false otherwiseaddress
- originating address, or email if this message was from an email gatewaypublic InboundSmsTracker(byte[] pdu, long timestamp, int destPort, boolean is3gpp2, String address, int referenceNumber, int sequenceNumber, int messageCount, boolean is3gpp2WapPdu, String messageBody)
pdu
- the message PDUtimestamp
- the message timestampdestPort
- the destination portis3gpp2
- true for 3GPP2 format; false for 3GPP formataddress
- originating address, or email if this message was from an email gatewayreferenceNumber
- the concatenated reference numbersequenceNumber
- the sequence number of this segment (0-based)messageCount
- the total number of segmentsis3gpp2WapPdu
- true for 3GPP2 format WAP PDU; false otherwisepublic InboundSmsTracker(Cursor cursor, boolean isCurrentFormat3gpp2)
cursor
- a Cursor pointing to the row to construct this SmsTracker forpublic ContentValues getContentValues()
public static int getRealDestPort(int destPort)
destPort
- the destination port value, with flagspublic void setDeleteWhere(String deleteWhere, String[] deleteWhereArgs)
deleteWhere
- the selection to usedeleteWhereArgs
- the selection args to usepublic String toString()
Object
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
public byte[] getPdu()
public long getTimestamp()
public int getDestPort()
public boolean is3gpp2()
public String getFormat()
public int getIndexOffset()
public String getAddress()
public String getMessageBody()
public int getReferenceNumber()
public int getSequenceNumber()
public int getMessageCount()
public String getDeleteWhere()
public String[] getDeleteWhereArgs()