Android 安卓短信状态
我知道不应该使用SMS提供商,但我想知道名为“状态”的字段(其他一些字段也是,但我最感兴趣的是状态)的可能值,以及这些值在我这样做时的含义:Android 安卓短信状态,android,sms,status,Android,Sms,Status,我知道不应该使用SMS提供商,但我想知道名为“状态”的字段(其他一些字段也是,但我最感兴趣的是状态)的可能值,以及这些值在我这样做时的含义: Uri uriSms = Uri.parse("content://sms/inbox"); Cursor c = context.getContentResolver().query(uriSms, null,null,null,null); //fields retrieved 0: _id 1: thread_id 2: address 3: p
Uri uriSms = Uri.parse("content://sms/inbox");
Cursor c = context.getContentResolver().query(uriSms, null,null,null,null);
//fields retrieved
0: _id
1: thread_id
2: address
3: person
4: date
5: protocol
6: read
7: status
8: type
9: reply_path_present
10: subject
11: body
12: service_center
13: locked
我自己找到了答案。在类core/java/android/provider/Telephony.java()中。有以下几行代码:
/**
* The TP-Status value for the message, or -1 if no status has
* been received
*/
public static final String STATUS = "status";
public static final int STATUS_NONE = -1;
public static final int STATUS_COMPLETE = 0;
public static final int STATUS_PENDING = 32;
public static final int STATUS_FAILED = 64;
如果您对这些值感兴趣,可能还需要查看“type”列。这可能很有用。链接已断开。@POEDR366应如何获取未发送的已发送消息意味着状态为“状态”\u失败请查看此文档: