5

我知道不应该使用 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: person
4: date
5: protocol
6: read   
7: status
8: type
9: reply_path_present
10: subject
11: body
12: service_center
13: locked
4

1 回答 1

9

我自己找到了答案。在 core/java/android/provider/Telephony.java类中(这里是 github 上的类)。有这些代码行:

/**
* 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;

如果您对这些值感兴趣,您可能还想查看“类型”列。它可能很有用。

于 2012-04-25T07:51:09.460 回答