Android application with phone book synchronization?(与电话簿同步的 Android 应用程序?)
问题描述
我正在创建一个 android 测试应用程序,其中我有一个按钮.单击按钮时,我想将电话簿记录与我的本地数据库同步.如果电话簿中的记录不在 db 表中,则插入它,否则保持原样.那我该怎么做呢?
I am creating one android test application , in which i have one button. On button click ,i want to synchronize phonebook records with my local database.If record in phone book is not in db table then insert it , otherwise leave it as it is. so how can i do this?
推荐答案
要从电话簿中获取联系人列表,您需要在 AndroidManifest.XML
中写入权限(即 android.permission.READ_CONTACTS
) .您可以使用以下方法收集联系人列表.
For getting contact list from your phone book you need write permission in AndroidManifest.XML
(i.e. android.permission.READ_CONTACTS
) .And you can collect contact list using following method.
如果在获取联系人列表时遇到任何问题,请告诉我.
And Let me know if are having any issue in getting contact list.
这篇关于与电话簿同步的 Android 应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!