[code]Cursor cur = mContext.getContentResolver().query( ContactsContract.Contacts.CONTENT_URI, new String[] {"display_name"}, "_id=?", new String[] {String.valueOf(msg.mPerson)}, null); if (cur != null) { if(cur.moveToFirst()) { //ContactsContract.Contacts.DISPLAY_NAME int idx = cur.getColumnIndex("display_name"); ...
by _Rayx - 移动操作系统 - 2012-06-19 15:51:06 阅读(1993) 回复(0)
android 2.0读取所有联系人姓名与电话 在网上看到的读取所有联系人姓名与电话的代码都是这样的:[code]ContentResolver cr = getContentResolver(); Cursor cursor = cr.query(ContactsContract.Contacts.CONTENT_URI, null, null, null, null); while (cursor.moveToNext()) { // 取得联系人名字 int nameFieldColumnIndex = cursor.getColumnIndex(PhoneLookup.DISPLAY_NAME); String name = cursor....
转:marvin
android 联系人数据库(2.0以后)
最近研究了下android 2.0的联系人数据库。
主要数据有三张表:contacts, raw_contacts,data。
contacts:主要是raw_contacts的一个合并。
raw_contacts:是每条记录表示一条联系人。
data:最基本的表,其中包含所有联系人的数据。每条记录都有一个mime type代表该记录的类型。
新增一条联系人:[code]
ArrayList
本帖最后由 renxiao2003 于 2010-04-07 16:21 编辑 哪位朋友有android平台(1.6)上读取SIM卡上通讯录信息的示例代码?跟上!
小弟今天调试android平台的程序,在短信接收的位置加了断点 SmsRecevier.onReceive (Context, Intent)line:21 <---断点在这里,由我自己实现。 ActivityThread.handleReceiver(ActivityThread$ReceiverData):ine:2810 这个函数会调用上面函数,但无法查看到源码。 我已经找到了,ActivityThread实现的位置,就在我下载的android源码的frameworks/base/core/java/android/app/ActivityThread.java这个位置。 请问如何进行关联呢? ...
android扫雷游戏源码 代码介绍: MineSweeper是一个不错的android开源扫雷游戏,对于初学android开发网的网友可能有很大的帮助,对于Java游戏开发也有一定的参考意义。该游戏主要有以下技术值得学习: 1. 个性化字体,计分器使用的是LED字体,可以帮助我们如何导入外部字体在android平台中显示。 2. 带图片的Toast,下面的You won in 36 seconds这个Toast使用了自定义的布局,可以显示图片和文字。 3. 自定义Button控件,可以看...
android 2.2
|-- Makefile
|-- bionic # bionic C库,继承自BSD, 针对移动设备作了优化,及其它扩展
|-- bootable # 启动引导相关代码
|-- build  ...
获取android源码 最近google的源代码地址被墙了,表现为 未预期的符号 `newline' 附近有语法错误,所以我们需要另辟战场 1. bin里的repo从这里得到http://code.google.com/p/git-repo/,也可以这样 curl http://git-repo.googlecode.com/files/repo-1.13 > repo 2. 修改repo里的https://code.google.com/p/git-repo/ 为 http://code.google.com/p/git-repo/ 3. 然后进s...
repo init -u git://android.git.kernel.org/platform/manifest.git -b cupcake 后面的-b的cupcake是branch名字?在哪查啊?我没加-b下载的源码编译提示 Checking API: checkapi-last frameworks/base/api/3.xml:253614: error 1: required string: "implements" ****************************** You have tried to change the API from what has been previously released in an SDK. Please fix the errors listed above. **...
by tangke 2009-06-10 目前android比较流行,笔者也跟着凑凑热闹,因为android是开发源代码的,所以我们一般情况下肯定要得到其最新源代码。 如何得到android的最新源代码 sudo apt-get install git-core curl curl http://android.git.kernel.org/repo >git_android mv git_android /usr/bin/ chmod +x /usr/bin/git_android git_android init -u git://android.git.kernel.org/platform/manifest.git git_android sync 不幸的...