Android: documentation for content://sms/ "type" values?
Asked Answered
M

3

15

I know that the content://sms/ provider is not officially supported in Android. Nonetheless, I'm wondering if there are some commonly used conventions for the values that appear in the "type" column that can be returned from content://sms/ queries.

For example, I know that types "1" and "2" often represent "incoming" and "outgoing", respectively. Are there any other type values that are commonly used? For example, I sometimes see type "20".

Thanks in advance for any pointers to information or discussions about this.

Mychael answered 12/3, 2013 at 2:11 Comment(5)
I found an answer. I guess it's probably as complete as I can hope for: androidjavadoc.com/m5-rc15/…Mychael
This is very good . ! I have been searching around since ages !Fault
@Mychael the doesnt exist any moreInternal
I got a type 19 from a crash report.....?!Dariodariole
Here is NYCHippo's link from archive.org: web.archive.org/web/20120224065204/http://…Lajoie
S
15

If you're dealing with SMS you'll need to dig around source code given that there is virtually no documentation available.

I think this is what you're looking for:

public static final int MESSAGE_TYPE_ALL    = 0;
public static final int MESSAGE_TYPE_INBOX  = 1;
public static final int MESSAGE_TYPE_SENT   = 2;
public static final int MESSAGE_TYPE_DRAFT  = 3;
public static final int MESSAGE_TYPE_OUTBOX = 4;
public static final int MESSAGE_TYPE_FAILED = 5; // for failed outgoing messages
public static final int MESSAGE_TYPE_QUEUED = 6; // for messages to send later  

From android.provider.Telephony.

Stannite answered 18/9, 2013 at 13:40 Comment(0)
G
14

Not sure about the type 20.

but what i know is..

Inbox = "content://sms/inbox"
Failed = "content://sms/failed"
Queued = "content://sms/queued"
Sent = "content://sms/sent"
Draft = "content://sms/draft"
Outbox = "content://sms/outbox"
Undelivered = "content://sms/undelivered"
All = "content://sms/all"
Conversations = "content://sms/conversations".
Gaytan answered 27/8, 2013 at 6:26 Comment(0)
A
4

Search for SmsProvider.java

private static final int SMS_ALL = 0;
private static final int SMS_ALL_ID = 1;
private static final int SMS_INBOX = 2;
private static final int SMS_INBOX_ID = 3;
private static final int SMS_SENT = 4;
private static final int SMS_SENT_ID = 5;
private static final int SMS_DRAFT = 6;
private static final int SMS_DRAFT_ID = 7;
private static final int SMS_OUTBOX = 8;
private static final int SMS_OUTBOX_ID = 9;
private static final int SMS_CONVERSATIONS = 10;
private static final int SMS_CONVERSATIONS_ID = 11;
private static final int SMS_RAW_MESSAGE = 15;
private static final int SMS_ATTACHMENT = 16;
private static final int SMS_ATTACHMENT_ID = 17;
private static final int SMS_NEW_THREAD_ID = 18;
private static final int SMS_QUERY_THREAD_ID = 19;
private static final int SMS_STATUS_ID = 20;
private static final int SMS_STATUS_PENDING = 21;
private static final int SMS_ALL_ICC = 22;
private static final int SMS_ICC = 23;
private static final int SMS_FAILED = 24;
private static final int SMS_FAILED_ID = 25;
private static final int SMS_QUEUED = 26;
private static final int SMS_UNDELIVERED = 27;
Aerobe answered 8/2, 2014 at 13:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.