Android: documentation for content://sms/ "type" values?

android, android-contentprovider, sms, types

Solution

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.

Problem

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.

Original source