Android: How to import a contact from a phone?

I am making a contact request. I want to import all the contacts stored in the phone and SIM cards into my application, but I do not know how to write the code. Any help and tips or links to helpful answers would be greatly appreciated. Thank you for taking the precious time to consider this issue.

+4
source share
1 answer

You need to use:

Cursor contacts = getContentResolver().query(ContactsContract.Contacts.CONTENT_URI, null, null, null, null);

Here is a complete tutorial on this subject: http://saigeethamn.blogspot.in/2011/05/contacts-api-20-and-above-android.html

+4
source

All Articles