‫-: Hi.
‫Within this lecture
‫we are going to complete our Firebased integration
‫by adding the specified dependencies in our documentation.
‫So, over here it says that you have to add these SDKs
‫for desired Firebased products.
‫And it gives us a webpage over here, actually.
‫So, I'm going to open this web page.
‫So, if you don't see this, then don't worry.
‫I'm going to show you exactly what to write over here.
‫But just for reference,
‫I'm going to open this
‫and show it to you.
‫So, why are we doing this?
‫Why are we adding some different libraries?
‫Why doesn't it come all together?
‫So, as you can see,
‫Firebase has a lot of modules.
‫Like, it has its own advertisement module.
‫It has its own cloud messaging,
‫like storage, and database, AdMob, analytics.
‫Remember, we didn't even enable analytics in our app.
‫So, these are all for different reasons,
‫different purposes.
‫So, if you're using everything related
‫to Firebase in your application,
‫of course, you're gonna have to add them all together.
‫But, if you're not going to use,
‫then why do you want to edit, right?
‫Because it will make your project bigger,
‫it will make your project slower,
‫if you add everything, all together.
‫So, rather than this,
‫Firebase actually separated every module
‫into its own dependency,
‫and it advises to download
‫what you really need in your project.
‫So, this is exactly what we are going to do
‫in this lecture.
‫So, we are not going to use analytics,
‫for example,
‫we are not going to use cloud storage.
‫So, cloud storage is
‫for storing pictures or videos,
‫like media, in your app.
‫So, we are not going to need it, okay?
‫We are building a Twitter app.
‫We are only going to share strings like data,
‫and we can save all them to database.
‫And that's what we are going to do.
‫We are going to bring in Firestore,
‫which is a database.
‫And, for example,
‫we are going to use authentication modules,
‫because remember,
‫we had some username
‫and password login page.
‫So, we are going to bring in this,
‫but we are not going to
‫bring in cloud messaging,
‫or other dynamic links, or in-app messaging,
‫like machine learning kit and stuff.
‫So, we are going to take what we need.
‫And in order to do that,
‫I suggest you come to my GitHub page.
‫Of course,
‫you can copy and paste it
‫from that documentation, as well,
‫but it might be a little bit confusing,
‫if you're not an experienced developer.
‫So, rather, I'm going to go over my build.gradle,
‫under app folder,
‫and find the dependencies.
‫Okay.
‫This is my GitHub page,
‫as you can see,
‫and I'm going to copy and paste
‫this Firebase,
‫and actually, this recycler view of dependency, as well.
‫So, I'm going to copy it and paste
‫it on my project.
‫So, maybe you don't know what a recycler is.
‫I'm going to show you later on.
‫It's a view,
‫that we are going to use in our app.
‫We're going to use it to display
‫the tweets that we gather
‫from the Firebase server.
‫So, make sure you copy all of this, okay?
‫And beware that the versions might change.
‫It changes like every month
‫so, it will be a little bit different for you.
‫I'm going to show you what you need to do exactly,
‫so, don't worry.
‫I'm writing this under dependencies,
‫between two curly braces,
‫not somewhere else.
‫And after I paste it,
‫I'm going to hit the sync now button.
‫So, if you're using a version,
‫and if there is a newer version,
‫it will give you an update.
‫It will highlight it.
‫So, I'm going to show you how it looks actually.
‫So, if you give an error,
‫if you take an error, like that,
‫then you're gonna have to change it
‫to the latest version.
‫So right now, as you can see,
‫I don't get any error,
‫but I will show you an error instance
‫that we get in the build.gradle project level.
‫I actually notice that error before,
‫but in order to show you,
‫in a better situation, I didn't touch it.
‫Now, if you come over here,
‫you will see that there is a newer version like this.
‫So it says that yeah,
‫there is a 4.3.2, and yeah,
‫it's a 4.3.3 and you're using 4.3.2.
‫So I, if I change it, and if I hit sync now,
‫it'll be synchronized to the latest version,
‫and you are going to have to do
‫the exact same thing over here.
‫Okay?
‫So make sure you control the latest version
‫for this auth Firestore,
‫and recycler view,
‫and change them to the latest version.
‫And if you get an error,
‫you're more than welcome
‫to use these versions,
‫like 19.1.0 and 21.3.0.
‫But it's always a good idea
‫to work with latest version.
‫Okay?
‫So after you're done,
‫you can just close this down.
‫And now we synchronize everything,
‫and our app is actually connected with Firebase.
‫Okay?
‫So right now, if you run this on emulator,
‫if you don't get any errors,
‫it means that you successfully integrated
‫Firebase into your own app.
‫And of course,
‫we don't even have any code right now.
‫And what you are seeing right now,
‫is the older version that I have created,
‫in order to demonstrate how it works to you.
‫Okay?
‫It will just go and bring in the new version
‫right now,
‫and we will see Hello World text,
‫because we haven't touched it yet.
‫And as you can see, we don't get any errors.
‫It means that everything is successful.
‫So far, so good.
‫Now, we are going to stop here,
‫and within the next lecture we are going to
‫start building our app,
‫looking at my GitHub project.