‫Hello my friends, and welcome back.
‫In this video we'll learn how to add Firebase to Android applications.
‫I created a Firebase application project.
‫Now the first step is to go to Firebase.google.com and sign in with your Google account.
‫Click Get Started.
‫Here you should sign in with your Google account and you can create a free account.
‫And after you successfully sign in, click on Add Project.
‫Enter your project name and I name it as Firebase Demo App.
‫I confirm that I use Firebase exclusively for purposes related to my trade, business, craft or profession
‫and here recommended to enable Google Analytics for this project, click continue.
‫Select an account default account for Firebase.
‫This is for Google Analytics.
‫Click Create Project and wait for Firebase to create this project.
‫And your new project is ready.
‫Click continue and you will direct it to this console.
‫Get started by adding Firebase to your app.
‫You can select iOS, Android, web, Unity and Flutter.
‫For now we will select Android.
‫Here you need to add Android package name.
‫Go to Android Studio and here copy this package name.
‫Paste it here.
‫The app nickname.
‫This is optional debug signing certificate as Sha one.
‫This is optional.
‫This is required for dynamic links, Google sign in or phone number support in authentication.
‫Later on we'll talk about this key.
‫Click on Register app button.
‫Then you need to download Google Services dot Json file.
‫And this is the file.
‫Make sure guys that Google Dash services dot Json.
‫No any other letters.
‫This is a case sensitive naming for this file.
‫Copy this file and add it to your app module directory, usually the app module in your Android Studio
‫project.
‫Let's go to here.
‫To the app you need to select project.
‫This is the app Firebase and this is the app module for the project.
‫Paste it here in the app.
‫Make sure guys it's the same name as this Google Dash services dot Json.
‫Many people and many developers have conflicts with this naming.
‫Okay.
‫And this is our Json file.
‫Close it and you can see it.
‫It's inside Google Services, inside the app directory of the Firebase app of at the level of the project.
‫Then you can select Android again.
‫And here we go.
‫Step number three is to add a Firebase dependency and the SDK to your projects.
‫For that I'll use Kotlin DSL because I'm using Build Granite Acts.
‫You can use groovy.
‫And now I'll copy this add dependency for Google Services Gradle plugin.
‫This is the root level.
‫Project level.
‫Let's go to the Gradle project level.
‫And here inside the plugins I need to add the Firebase.
‫So this is the Firebase sync now.
‫And then in your app model app level you need to add the dependency.
‫Since I'm using in this section Java I'll use and select Java option.
‫At first I'll add Google Services Gradle plugin in the plugins.
‫Paste it.
‫Then the second step in adding dependency is to add the dependencies.
‫From here Firebase and the analytics copy them.
‫Scroll down into Dependency Scoop and paste it here.
‫There is a very important topic here.
‫Add dependencies for Firebase products you want to use when using the bomb.
‫You don't specify versions in Firebase dependencies, so you can see implementation of analytics Firebase
‫analytics SDK with no versions.
‫But because I'm using Bomb.
‫But if I delete this, I need to use the latest version and specify the latest version of the Firebase
‫Analytics.
‫But I prefer using the bomb always with my projects.
‫Click sync now and here next and you are all set.
‫Let's click on continue to the console.
‫And here we go.
‫This is our Firebase demo app.
‫We can add the services like authentication Cloud Firestore performance, Crashlytics Cloud Messages
‫AB testing and many other services.
‫So in the next videos we'll learn more about Firebase.