p4u144
p4u144

Reputation: 757

Android sms status

I know that the SMS provider is not supposed to be used, but I'd like to know what are the possible values for the field called "status" (some of the other fields too, but i'm mostly interested in status) and what those values mean when I do this :

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

Upvotes: 5

Views: 3494

Answers (1)

p4u144
p4u144

Reputation: 757

I have found the answer by myself. In the class core/java/android/provider/Telephony.java (class on github here). There are those lines of code :

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

If you are interested in those values, you may want to have a look at the column "type" too. It could be useful.

Upvotes: 9

Related Questions