Introduction To Android Contacts

Learn to work with the Android contacts database. Basic knowledge of accessing SQLite in Android along with using Cursors is expected. See theAndroid SQLite and Cursor Articlefor more information. Google changed the contacts database moving from 1.x to 2.0 versions of Android. This tutorial will be broken into 3 sections. First covering accessing contacts in Android 2.0. The second page will deal with accessing the contacts in Android 1.6 and before. Third we'll glue it all together with a class that abstracts specific classes for each version and a set of classes to manage the data from the contact records.


Contacts 读取代码:

AndroidManifest.xml 权限

记得在AndroidManifest.xml中加入android.permission.READ_CONTACTS这个permission

<uses-permission android:name="android.permission.READ_CONTACTS" />


运行结果:



代码示例


参考推荐:

Working With Android Contacts

Android Contacts的使用


更多相关文章

  1. Android学习感想一
  2. [原]Android有用代码片断(六)
  3. android shape 代码实现按钮背景
  4. android shape 代码实现按钮背景
  5. [笔记分享] [Android] Android系统概述
  6. android与javascript交互调用
  7. Android(安卓)使用Vitamio打造自己的万能播放器(4)――本地播放(快
  8. Android(安卓)文件的保存与读取之SDCard(SD卡)存储
  9. Android引路蜂地图开发示例:基本知识

随机推荐

  1. 美国围棋选手使用Python自动评级,不发段位
  2. 用Python模拟AlphaGo项目出现
  3. Swift支持ubuntu, ubuntu讨论默认Python3
  4. SpringBoot应用中使用AOP记录接口访问日
  5. libp2p-rs v0.2.0 发布
  6. SpringBoot应用整合ELK实现日志收集
  7. MyBatis Generator使用过程中踩过的一个
  8. 商品管理 数据库表结构 图片 功能结构
  9. gevent支持Python3
  10. mall数据库表结构概览