VOOZH about

URL: https://www.geeksforgeeks.org/android/how-to-create-contacts-app-in-android-studio/

⇱ How to Create Contacts App in Android Studio? - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

How to Create Contacts App in Android Studio?

Last Updated : 23 Jul, 2025

Contacts app in android device is a system app that comes installed on your android device. Different devices have different UI for the contacts app. In this article, we will take a look at how we can build our own contacts app in Android Studio

What we are going to build in this article? 

We will be building a simple application in which we will be displaying the list of contacts that are stored in the user's device. Along with that we will be also adding a feature to save a new contact, filter contacts from the list using the search bar, and many more. Below is the video in which we will get to see what we are going to build in this article. 

Step by Step Implementation

Step 1: Create a New Project

To create a new project in Android Studio please refer to How to Create/Start a New Project in Android Studio.

Note: that select Java/Kotlin as the programming language.

Step 2: Add dependency and JitPack Repository

As we will have to request the user's permissions to display contacts from the device in the app, that we have to ask for the user's permissions. So for getting user's permissions we will be using Dexter for getting user's permissions in runtime. For using Dexter, we have added the below dependency in build.gradle.kts file.  Navigate to the Gradle Scripts > build.gradle.kts (Module:app) and add the below dependency in the dependencies section.

dependencies {
...
implementation ("com.karumi:dexter:6.2.2")
}

Add the JitPack repository to settings.gradle.kts

dependencyResolutionManagement {
...
repositories {
...
maven { url = uri("https://jitpack.io/") }
}
}

Now sync your project.

Step 3: Adding permissions in the AndroidManifest.xml 

Navigate to the app > manifests > AndroidManifest.xml file and add the below permissions to it.

AndroidManifest.xml:


Step 4: Working with the Main Layout

Navigate to the app > res > layout > activity_main.xml and add the below code to that file. Now, create a new layout file for each item of the recyclerview. Set the name as contact_rv_item.xml and add the below code in the file.


Step 5: Creating a modal class for each contacts 

Navigate to the app > java > {package-name}, Right-click on it, New > Java/Kotlin class and name it as Contacts and add below code to it. Comments are added in the code to get to know in more detail. 


Step 6: Creating an adapter class 

Navigate to the app > java > {package-name}, Right-click on it, New > Java/Kotlin class and name it as Adapter and add the below code to it. Comments are added in the code to get to know in more detail. 


Step 8: Working with the MainActivity file

Go to the MainActivity file and refer to the following code. Below is the code for the MainActivity file. Comments are added inside the code to understand the code in more detail.


Step 9: Working with the CreateNewContactActivity 

Below is the code for both activity_create_new_contact.xml and CreateNewContactActivity Java/Kotlin file. Comments are added inside the code to understand the code in more detail.


Step 10: Working with the ContactDetailActivity

Below is the code for both activity_contact_detail.xml and ContactDetailActivity Java/Kotlin file. Comments are added inside the code to understand the code in more detail.

Now run your app and see the output of the app.

Note: For all the drawable files you may refer to the GitHub link below or you may add it of your own.

Output:

Check out the project on below Github link: Contacts_App_Android

Comment

Explore