Check Mobile App
Read now
Start a Project

Getting all contacts of mobile in your application


In your application you may want to get any contact that is stored on user device or let user select any contact or number of contacts. This is necessary for sending message or inviting friends from an application so how we will get device contacts? It can be done by using ContactContract provider

We simply have to query ContactContract regarding the data we want. Here in this tutorial we are getting all the contacts and shows them in a list from where user can pick one or more contacts as he/she wants.

Firstly we have to add permissions to our manifest file for reading contacts

Now create an activity/ fragment which will get contacts data and set it in a listview. Here I am using an activity, the xmls related to the activity will be like




And you will get all the contacts saved on th device just like that.screenshot

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*

Be the first to comment.


When I think in getting solutions for my Ecommerce Platform, I think of Webkul. They have been such a blessing in our business. We have spent thousands of dollars in support and modules from them. We love their support team. They work very closely with us, and they always go the extra mile when we need help.

Michael Urresta

Michael Urresta

Talk to Sales


Live Chat
Start a Project

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home