Android 通讯录学习笔记之——调用系统添加成员功能

原文地址:http://blog.csdn.net/a742635625/article/details/6572922

代码功能:调用系统通讯录的添加成员功能

代码示例:

         /** 添加联系人 */
                Intent intent = new Intent(Intent.ACTION_INSERT);
                intent.setType("vnd.android.cursor.dir/person");
                intent.setType("vnd.android.cursor.dir/contact");
                intent.setType("vnd.android.cursor.dir/raw_contact");
                startActivity(intent);

 

另: 从Android 2.0 SDK开始,有关联系人provider的类变成了ContactsContract,虽然老的android.provider.Contacts能用, 但是在SDK中已被标记为deprecated(意即:将被放弃不推荐的方法),而从Android 2.0及API Level为5开始新增了android.provider.ContactsContract来代替原来的方法。(资料来源:http://zymic.iteye.com/blog/737643)

posted @ 2012-04-21 17:18  Binary-Stream  阅读(627)  评论(0编辑  收藏  举报