我正在使用content:// mms-sms / conversations来获取消息传递线程列表。由于某种原因,它省略了仅由mms消息组成的线程。 (它确实列出了与mms和sms混合的线程。)注意 - 我故意不使用新的19级api。这是我的代码片段:
Cursor cursor = getContentResolver().query
(Uri.parse ("content://mms-sms/conversations"),
null, null, null, "date DESC");
while (cursor.moveToNext())
{
long key = cursor.getLong (cursor.getColumnIndex ("_id"));
long threadId = cursor.getLong (cursor.getColumnIndex ("thread_id"));
String address = cursor.getString (cursor.getColumnIndex ("address")); // phone #
long date = cursor.getLong (cursor.getColumnIndex ("date"));
String body = cursor.getString (cursor.getColumnIndex ("body"));
String q = String.format ("%04d %04d %10s %s %s",
key, threadId, address,
formatDate(date),
body == null ? "" : body.substring (0,Math.min(10,body.length()-1)));
logD (q); // simple wrapper for Log.d()
}
cursor.close();
还有其他人观察过这个吗?有什么工作吗? 感谢。