Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/213.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 安卓短信状态_Android_Sms_Status - Fatal编程技术网

Android 安卓短信状态

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

我知道不应该使用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

我自己找到了答案。在类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失败请查看此文档: