public static List SmaDataManager.getThreads(Context context)
public static List<TxrjThreads> getThreads(Context context)
解析获取Threads列表之要点:
1. 得到带有fail信息的threadId列表。
List<Integer> failedIds = getFailedMsgThreadIds(context);
2. 得到带有draft信息的threadId列表。
List<Integer> draftIds = getDraftMsgThreadIds(context);
3. 从数据库表threads中查询数据。
Cursor cursor = context.getContentResolver().query(Telephony.Sms.CONTENT_URI,
new String[] {"* from threads order by date desc--"},
null, null, null);
4. 获取threadId相应的未读信息条数。
getUnreadMsgCountByThreadId(context,thread.getThreadId())
5. 获取recipient_ids相应的名字和号码。
getNameAddressForRecipients(context, thread.getRecipientId())
6. 总结getThreads方法需要做的事情。
A. 从数据库表threads中查询snippet, message_count, date, recipient_ids, read, threadId。
B. 从sms表中找出未读信息。
C. 从sms表中找出草稿信息。
D. 从canonical_addresses表中找出recipient的address(号码)。
E. 从contact2数据库data表中查找出address对应的Name。
public static List SmaDataManager.getThreads(Context context)的更多相关文章
- 使用eclipse的快捷键自动生成的map或者reduce函数的参数中:“org.apache.hadoop.mapreduce.Reducer.Context context”
今天在测试mapreduce的程序时,就是简单的去重,对照课本上的程序和自己的程序,唯一不同的就是“org.apache.hadoop.mapreduce.Reducer.Context contex ...
- Android应用开发中关于this.context=context的理解
在Android应用开发中,有的类里面需要声明一个Context的成员变量,然后还需要在该类的构造函数中加上this.context=context;这行代码.为什么要这么写呢?不写不行么? 先看下面 ...
- android中自定义view构造函数ContentItemView(Context context, AttributeSet paramAttributeSet)的用处
自己定义一个view <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:a ...
- 关于AlertDialog.Builder(Context context)中所应传入的context
错误报告: 10-20 14:34:46.565: E/AndroidRuntime(23098): FATAL EXCEPTION: main10-20 14:34:46.565: E/Androi ...
- public static void Invoke (Action action)
using System; using System.Security.Principal; using System.Security.Permissions; namespace Demo { c ...
- Spring MVC exception - Invoking request method resulted in exception : public static native long java.lang.System.currentTimeMillis()
最近在线上系统发现下面的异常信息: 2014-10-11 11:14:09 ERROR [org.springframework.web.servlet.mvc.annotation.Annotati ...
- public static void main(String[] args){}函数理解
主函数的一般写法如下: public static void main(String[] args){…} 下面分别解释这些关键字的作用: (1)public关键字,这个好理解,声明主函数为publi ...
- 为什么接口要规定成员变量必须是public static final的呢?(转)
在interface里面的变量默认都是public static final 的.所以可以直接省略修饰符: String param="ssm"://变量需要初始化 为什么接口要规 ...
- public static void main(String[] args){}函数诠释
public static void main(String[] args){}函数诠释 主函数的一般写法如下: public static void main(String[] args){-} 下 ...
随机推荐
- C++ 变量默认初始值不确定(代码测试)
C++ int变量默认初始值是不确定的,因此使用时初始化是很有必要的. 下面写个小程序测试一下int变量默认初始值. #include <iostream> #include <ve ...
- maskrcnn_benchmark代码分析(3)
数据结构 数据加载 数据后处理
- Luban 鲁班 图片压缩 MD
Markdown版本笔记 我的GitHub首页 我的博客 我的微信 我的邮箱 MyAndroidBlogs baiqiantao baiqiantao bqt20094 baiqiantao@sina ...
- Angular2 -- 生命周期钩子
组件生命周期钩子 指令和组件的实例有一个生命周期:新建.更新和销毁. 每个接口都有唯一的一个钩子方法,它们的名字是由接口名加上 ng前缀构成的.比如,OnInit接口的钩子方法叫做ngOnInit. ...
- spring mvc 学习01 搭建
/** * */ /** * @author Administrator * */ package com.study01.controller; import org.springframework ...
- capwap学习笔记——初识capwap(一)
2 初识CAPWAP 2.1 CAPWAP简介 说了半天CAPWAP,连全称都还没说,汗-- CAPWAP--Control And Provisioning of Wireless Access P ...
- OpenNebula学习第四节之磁盘镜像的制作
一.准备工作 需要准备一个Ubuntu16.04的ISO文件上传至服务器,如下图所示 二.操作步骤 2.1:创建操作目录 创建一个/var/tmp/cloud_image目录,把Ubuntu16.04 ...
- How to duplicate the records in a MongoDB collection
// Fill out a literal array of collections you want to duplicate the records in. // Iterate over e ...
- Spring中的代理模式
代理模式 所谓代理,就是一个人或者一个机构代表另一个人或者另一个机构采取行动.在一些情况下,一个客户不想或者不能够直接引用一个对象,而代理对象可以在客户端和目标对象之间起到中介的作用. 代理模式是一种 ...
- OpenGL ES 3.0之Texturing纹理详解(一)
本文流程 1.Texturing基础 2.装载Texturing和mipmapping 3.纹理过滤和包装 4.Texture level-of-detail, swizzles, and depth ...