直接上代码了
1.获取收件箱列表
效果:
2.获取会话内容
public static Intent createIntent(Context context, long threadId) {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(getUri(threadId));
return intent;
}
public static Uri getUri(long threadId) {
// TODO: Callers using this should really just have a Conversation
// and call getUri() on it, but this guarantees no blocking.
return ContentUris.withAppendedId(CONVERSATIONS_URI, threadId);
}
效果: