我知道Android 不正式支持content://sms/提供程序。尽管如此,我想知道对于出现在“类型”列中的值是否有一些常用的约定,可以从content://sms/查询返回。
例如,我知道类型“1”和“2”通常分别代表“传入”和“传出”。还有其他常用的类型值吗?例如,我有时会看到类型“20”。
提前感谢您提供有关此信息或讨论的任何指针。
我知道Android 不正式支持content://sms/提供程序。尽管如此,我想知道对于出现在“类型”列中的值是否有一些常用的约定,可以从content://sms/查询返回。
例如,我知道类型“1”和“2”通常分别代表“传入”和“传出”。还有其他常用的类型值吗?例如,我有时会看到类型“20”。
提前感谢您提供有关此信息或讨论的任何指针。
如果您正在处理 SMS,您将需要挖掘源代码,因为几乎没有可用的文档。
我想这就是你要找的:
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
不确定20型。
但我知道的是..
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".
搜索 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;