Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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
like image 761
p4u144 Avatar asked Apr 24 '12 08:04

p4u144


1 Answers

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.

like image 61
p4u144 Avatar answered Sep 27 '22 18:09

p4u144