Where can I find the API to find out what the "type" constants are for SMS?
I'm getting the values: 1, 6 and 2.
But don't know which one is outgoing, incoming, etc...
SMSManager class manages operations like sending a text message, data message, and multimedia messages (MMS).
Telephony.Sms.Inbox. Contains all text-based SMS messages in the SMS app inbox. class. Telephony.Sms.Intents. Contains constants for SMS related Intents that are broadcast.
Manages SMS operations such as sending data, text, and pdu SMS messages. Get this object by calling the static method getDefault() . To create an instance of SmsManager associated with a specific subscription ID, call getSmsManagerForSubscriptionId(int) .
parse("content://sms/inbox"); // List required columns String[] reqCols = new String[]{"_id", "address", "body"}; // Get Content Resolver object, which will deal with Content Provider ContentResolver cr = getContentResolver(); // Fetch Inbox SMS Message from Built-in Content Provider Cursor c = cr.
According to TextBasedSmsColumns
the mapping is following:
MESSAGE_TYPE_ALL = 0;
MESSAGE_TYPE_INBOX = 1;
MESSAGE_TYPE_SENT = 2;
MESSAGE_TYPE_DRAFT = 3;
MESSAGE_TYPE_OUTBOX = 4;
MESSAGE_TYPE_FAILED = 5; // for failed outgoing messages
MESSAGE_TYPE_QUEUED = 6; // for messages to send later
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With