‫Hello, my friends, and welcome.
‫In this video, we will learn how to set up and connect Firebase with Android studio projects.
‫I will create.
‫A new project, Select empty activity and here I will name it as.
‫Firebase app.
‫Select Kotlin and click on Finish.
‫Now let's go to Firebase.google.com.
‫And this is the official website of Firebase.
‫You can see the products.
‫You can read a lot of new news and the events, the what the solutions they they provide.
‫So I will click on go to Console.
‫And here you need to sign in with your Google account.
‫Or you can create a new account.
‫And here is the console.
‫So I need to click on the Add project button.
‫Enter your project name.
‫I will name it as.
‫Firebase Kotlin.
‫Click.
‫Continue.
‫Default account for Firebase.
‫Create a project and wait for Firebase to create your project.
‫Then you will click on Continue button and you will be directed to fire Kotlin Dashboard Dashboard.
‫Here you can see that get started by adding Firebase to your app.
‫Apple Android Web Unity Flutter.
‫We are interested in adding Firebase to our Android application, so I need to add Firebase to Android
‫application.
‫Starting by specifying the package name, we go to Android studio.
‫We copy this package name.
‫And paste it here in the package.
‫Android.
‫The app nickname.
‫I will name it as Firebase Kotlin.
‫You can skip this.
‫This is just required for dynamic links if you are using dynamic links.
‫Google sign in or phone number support in oath and you need to get the Sha one in settings.
‫I will show you this step.
‫This is an optional step because we're going to use it in the next applications, but I should mention
‫it here.
‫We go back to Android studio.
‫We open settings and we select experimental.
‫And here I need to.
‫Uncheck Do not build gradle tasks list during Gradle Sync, Click Apply and click.
‫Okay.
‫Now let's click on.
‫Build and clean project and rebuild the project.
‫Then we click on Sync Project with Gradle.
‫This button and we click on Gradle.
‫We select tasks.
‫We select Android and the signing report.
‫Click Run Firebase signing report, and he will.
‫Here we go.
‫We have these numbers, all of these numbers.
‫We are interesting in getting the Sha one number.
‫Again, guys, this is not required.
‫This step is not required unless you are using dynamic links.
‫Google sign in or phone number support in authentication of Firebase.
‫Okay.
‫But I'm showing you all the steps.
‫If you if you try to get the phone number authentication or Google sign in to your application, click
‫register app.
‫This is not required for all projects.
‫Okay.
‫Now the second step is to download Google services and place them into the app folder.
‫You will get a folder, a sorry, a file called Google Services dot Json.
‫It's a Json file.
‫I will show.
‫This is the file, the Json file.
‫I will copy it and I need to paste it here exactly at the project level.
‫So you select the project.
‫You select app and here you will place this Json file.
‫Don't rename it, just add it and make sure not not to be a google services.
‫One, two, three.
‫You will.
‫You need to remove everything you need to rename it exactly as google services dot json.
‫Okay, so this is how we add the Json file to our application.
‫The third step is to add Firebase SDK to your project.
‫So I need and to make the Google services dot Json config values accessible to Firebase SDK, you need
‫Google Services Gradle plugin.
‫So how to add this plugin?
‫I need to copy this.
‫Build scripts.
‫If you are using the latest versions of Android Studio will not get the gradle file, so I will open
‫the project.
‫You can see like this.
‫So where are the build scripts you need to add them all.
‫Okay, I will add and remove this.
‫Click on sync now.
‫And I don't need all projects.
‫You can select the Kotlin or Java.
‫I am using Kotlin now I need to add the plugins.
‫So add Google services Gradle plugin.
‫I will copy this.
‫I will go to the model file.
‫I will add the plugin here.
‫Then I need to import the firebase Bom.
‫This is like a core and the like a the master.
‫The master dependency of Firebase.
‫Okay, so Firebase Bom.
‫Okay, this is how we add and implement the platform.
‫This is a platform here.
‫I need to add dependency for Firebase products you want to use.
‫But there is a very important note when using the bomb.
‫When you deal with and import the Firebase platform, you don't need to specify the version of Firebase
‫dependencies.
‫For example, I will import this analytics.
‫This is for Firebase Analytics.
‫And here we can see that we don't need to specify the version of the Firebase Analytics.
‫Okay, only import it like this because we have imported the.
‫Now let's click on next.
‫And here you are.
‫Make sure that you took you take a look at documentations to learn on how to get started with Firebase.
‫I will open this documentation.
‫You can explore sample Firebase.
‫But don't worry, we are clarifying everything.
‫By the way, some of the sample firebase are very complex.
‫Click continue and here we go.
‫We click on Sync now and now our app is ready to add Firebase Firebase products using authentication,
‫using file file, Firestore file storage, real time databases and so on.
‫So in this video we've learned how to create an app project and.