‫Hello, my friends.
‫In this video, we are going to set up the Firebase Project and create a new project in order to add
‫it to our application to send and receive the Cloud Messaging.
‫FCM Firebase Cloud Messaging.
‫Hey, so I create a new project in the console.
‫So after you go to Firebase Google to come, you log in and go to console.
‫You create a new project and then enter the project name.
‫I will name it as f c am.
‫EP.
‫And.
‫I will.
‫You can't ask the project name.
‫Let's start with a unique identifier.
‫Continue.
‫Now continue select that account.
‫I will select my account default account for Firebase Create Project and waiting for the project to
‫be created.
‫So Firebase Cloud messaging is a cross-platform messaging solution that lets you reliably send messages
‫and no cost.
‫Using FCM, you can notify a client app that that a new email or other data is available to sync.
‫You can send notification messages to drive user to re-engage and the retention.
‫So we'll see in our application how we will make this work continue and direct us to the FCM app.
‫Project.
‫Here you can select the FCM and other projects and I will select Android, so I will get the start by
‫adding Firebase to your app Android.
‫Here I will add the package name master coding the FCM App FCM App Register application.
‫Download Google dash service JSON.
‫This is the file.
‫Now let's go to Android studio and add this file to the app folder.
‫So here I will go to Android studio, click on New Project Empty Activity and I will select here at
‫the name FCM App.
‫Java and this is the package name exactly like that before FCM app.
‫Java.
‫And click on Finish.
‫Waiting for Android Studio to configure the application and I will show this file and here is the file.
‫I will cut it and I will go to the project.
‫I select project here.
‫So let me show you again what I have done again.
‫The project.
‫Select the project.
‫I will go through here application and I will paste it in the folder called Application.
‫Okay.
‫So I will click.
‫Okay.
‫And here we go.
‫If you see that.
‫Android or Firebase tells you inside Android stadia to put it in the project tab and the folder application.
‫Click on next.
‫Then we will copy this dependency.
‫So what are these dependencies?
‫First of all, we need at the project level build gradle.
‫I need to add the Google's maven repository so I will go to here.
‫I will select again the Android Not Project.
‫I will select the Gradle Scripts and the project.
‫Here are the plugins, that application and the library.
‫So Android library and here are the dependencies, the services for .3. 13 and all projects.
‫Google.
‫Okay.
‫Now.
‫I will add then the plug in here apply plug in application which is here.
‫And the plug in Google play services.
‫So I will copy this apply plugin or the name of the plugin.
‫I will put IDE and then apply plugin to true.
‫You can put it like this.
‫Can't think now.
‫I need to add these dependencies also.
‫Or I can put like this.
‫I copy.
‫Cut it.
‫I will paste here the surfaces.
‫You can try again.
‫Let me check again and I will copy this implementation.
‫Four bomb.
‫Base of firebase messaging, messaging and analytics.
‫I will copy it.
‫And.
‫These are the services.
‫Here.
‫I need to put the.
‫The plug in, so I need to add the class path so I will copy this build script.
‫I will paste it inside the build to Grandal.
‫I will remove the dependencies these this points.
‫I will click on sync now.
‫Maybe the project is working fine.
‫Okay.
‫So.
‫And here.
‫Don't miss to apply the plugins.
‫So according to documentations, I have added the build script here and here.
‫I have applied the Google play services and the ID application.
‫Then I have added the bio, the Firebase Analytics and this is this is what we need to to embed the
‫Firebase application.
‫Just another thing that I need to, to add its dependency is the work runtime and the messaging rate.
‫Later on we will see it.
‫But till now, follow me step by step in order to continue with our firebase and then we add the dependency
‫of FC.
‫So till now we have configured our application and linked it with our Android studio project and Firebase.
‫So we link Firebase with the Android stack.
‫Now we need to add the dependency of the Firebase messaging.
‫So I will kick on engage.
‫I select on cloud messaging and it will directly to the documentation.
‫Okay.
‫So.
‫I'll click on in app application in app messaging.
‫Create your first campaign.
‫You can send whatever you want, but how we configure the cloud messaging, there is a cloud messaging
‫and in app messaging first or the the that the target of our application is the cloud messaging we send
‫from the firebase to the application.
‫So how to use this functionality?
‫We add here the Firebase Cloud FCM, Firebase Cloud Messaging and we will start by implementation of
‫Google come to Google Dot Firebase.
‫That or two points.
‫Call them firebase messaging.
‫Dash messaging.
‫Okay.
‫This is the firebase messaging.
‫So here you can select whatever you want.
‫No need to specify the version because you are using the BOM.
‫So I click on sync now and everything will work fine.
‫Now I need to add the worker.
‫So the worker is like a background executable that do jobs in the background and wait for any event
‫or anything would happen suddenly.
‫And you will be informed.
‫And we use this worker because we are going to send messages from Firebase and our application should
‫be aware, should be in, in, in attention to any change.
‫So this worker will do for us the job.
‫We will start by implementation.
‫By the way, we have used this worker in the previous videos inside the that the background the background
‫services okay so walk that runtime 2.7.1.
‫So this is the worker we click on sync now.
‫And everything will work fine.
‫Okay.
‫Now I will close these.
‫One last thing I need to add is the use, permission and the internet.
‫So this is our application.
‫It's ready to start, including our messaging features in net.
‫So let's start.