‫Welcome back.
‫In order to save time, I'll use the same application we created before in the previous section.
‫Open Firebase application.
‫Ensure that you add this this in the plugins at the level of the project and in the module we add these
‫dependencies one for real time database, one for analytics and one for the platform of Firebase.
‫And the most important step here is to go to the project, ensure that Google Services Json file is
‫placed inside the app folder at the level of project.
‫Go back to Android and we're ready to go.
‫If we go to the console, this is our project.
‫And if you don't like to to use a previously created application, you can create a new application,
‫ensure that you add these dependencies and you add this file to the app folder.
‫After you created new project on Firebase console, I'll use Firebase demo app.
‫This is what we created before and select Build Real time database to access our real time database.
‫If you can see our database is empty I deleted all nodes.
‫Now our project is ready.
‫So let's start by creating the layouts.
‫Here I'll select Android, go to the layout, create a new layout resource file and I'll name it as
‫item Underscore card.
‫By the way we talked about card views recycler views a lot in the previous videos.
‫So in this video I'll make some speed up of the codes and copy and paste codes in order to save time.
‫I'll start with the card view, change this to Card View and I'll add the corner radius, then the.
‫Inside this constraintlayout, I'll create three text views.
‫And this is our layout.
‫This will act as a template for every item in the firebase.
‫Make sure that the height is wrapcontent for the constraintlayout and the height of this cardview will
‫be Wrapcontent.
‫Also, let's move to the main activity dot XML.
‫I'll remove this text view and I'll add here the recycler view Matchparent Matchparent id recycler view
‫and click on it and infer the constraints.
‫And you can see it will add these constraints.
‫Now we're ready to start building our application.
‫I'll create a new modal class.
‫I'll name it as user.
‫And inside this class I'll create three fields of type string.
‫The first one is the username, the second is phone number and the third one is group user Alt+ insert
‫to create the constructor.
‫Having these and always when working with Firebase, create an empty constructor.
‫This is a very important note.
‫Then I need to create getters and setters for these fields.