2012-04-24 11 views
4

SMSプロバイダが使用されていないことは知っていますが、「status」というフィールドの値は何か知りたいのですが(他のフィールドもありますがほとんどの状態に興味が)、私はこれを行うとき、これらの値が何を意味する:私は自分で答えを見つけたAndroid 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 

答えて

8

を。クラスcore/java/android/provider/Telephony.java(class on github here)。

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

これらの値に興味がある場合は、「タイプ」列も参照してください。それは役に立つかもしれない。

+0

リンクが壊れています。 – powder366

+1

@ powder366 https://android.googlesource.com/platform/frameworks/opt/telephony/+/master/src/java/android/provider/Telephony.javaは正常に動作するはずです – p4u144

+0

送信されなかった送信メッセージの取得方法ステータスは** STATUS_FAILED **です –