发送消息存储android失败

时间:2014-09-02 16:01:24

标签: java android sms message android-contentprovider

只想问一下默认的android消息传递应用程序存储和读取的位置无法发送消息。我认为可以content://sms/sentSTATUS_FAILED作为状态查询。感谢。

1 个答案:

答案 0 :(得分:4)

Telephony.Sms.Outbox。此课程将帮助您检索由于某种原因未发送的邮件。

使用URI作为content://sms/failed来检索失败的已发送消息。

同样,其他类型可以检索为:

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".

如果您想根据type检索它,请查看here

        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