How to connect android with Firebase database || Android and Firebase || Firebase + android #1

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello and welcome back to another tutorial and into this tutorial I'm gonna show you how to connect a firebase database into our Android application now this is pretty easy and straightforward process and I'm gonna guide you step-by-step so you won't have any doubts now for the self click on the Android studio icon and it will open up the Android studio from there click on start a new Android studio project provide an application name as well as a company domain and if you don't have one don't worry at this point it doesn't really matter any name is fine click Next choose an Android version just an activity style and also provide an activity name then click finish and then you will be taken into a window like this now once you are at this window what you want to do is that go to the tools menu on top right there click on it and among all the options click on firebase never load up our firebase pop-up with a lot of options yeah just like this you can see a lot of options here but none of them are important to us right now you can see a lot of options like analytics cloud messaging authentication real-time database storage and all that stuff but right now our main focus is on real-time databases so you want to click that and click the save and retrieve data link ok once you are at this page click on connect to firebase button now you will be taken into a default web browser and you might want to log into a Google account and if you are already logged in then you don't need to do this step but if you are now logged in they might want to do this now provide the password and okay when you see this click the yellow button so that your application can access the firebase database okay now it's all success and once everything is done you can see your icon details and everything in a window like this now click on connect to firebase and this will take awhile depending on your connection so make sure that you have a reliable internet connection the ways you know things will be a little bit slow something went wrong and this often happened again you can see this error you know very often but what you need to do at this point is that click on the connect to firebase button again and we'll I try to reconnect to your firebase and you will see something like this and you wanna press on this sync button and it will try to connect your firebase again and this time it should work yes it worked now we have successfully connected to firebase now we want to add our real-time database to our app so click on that button right there okay I now click Save Changes okay okay now you can see the application is syncing with the database of firebase database in the cloud so now we want to configure our access and everything related to the database so what you want to do that go to the firebase website and what you essentially need to do here is that you need to change these rules here as default these are set to false and you want to turn them into true so sign into your Google account once again and from there click on go to console from there you can see your database listed okay you can also see on the left corner you can see an android logo there which indicates that the database belong to an android application from there you have to click on the database and create database now at this point we are going to start our database in test mode clock mode is also fine but right now we are into stealing testing so that is fine so this one important step that you need to change from Claude Firestone to real-time database a lot of people forget to do that but this is very important a lot of people don't even see that option right there so that's an important step there you want to search it to the real-time database now once you've done that go to the rules tab and from there change the configuration to two as default everything is set to false for security purpose but you need to turn them into true now once everything is done click publish again see rules are published okay everything is done now I'll get back to your Android studio now you can see everything is set up correctly but one thing you need to do other than all of the connection stuff that you need to update the code with the latest database version so to obtain the latest data with version you need to refer the documentation for firebase since we are developing our application for Android we want to reference the Android documentation now if you are trying to develop an iOS application go and refer a relevant document so at this point you can see the version of your real-time database that is 16 point 0.5 and replace that and replace your current version with the latest version okay right now what I'm really trying to do is that I'm trying to write a code to test the connection status so I'm creating a toast here that says firebase connection success so that our connection is successful and it will show the toast now let me test my code let me alone Jim later first might take a while okay now you can see that firebase connection was successful because if chose to chose method is done right there so that's how you do it that's how you connect firebase database to your Android application now that was pretty easy and great forward like I said now as this is just a beginning and in further videos I'll be showing you a lot of other applications on firebase and how to do a lot of stuff like to achieve a lot of things by using of the parallel firebase that's it for now and stay tuned and if you haven't subscribed to my channel do that I really appreciate that and if you have any questions feel free to ask them down in the comment section below and I'll be answering them if I have time of course and thank you very much once again for sticking around and Happy Holidays
Info
Channel: Educatree
Views: 228,066
Rating: undefined out of 5
Keywords: connect android with Firebase database, How to connect android with Firebase database, connect android with Firebase, How to connect android with Firebase databas, connect android studio with firebase, android and firebase tutorial, firebase database tutorial android, connect android app with firebase, firebase android tutorial, firebase database android app, firebase database android, firebase database tutorial android studio, firebase tutorial, firebase database, android studio
Id: lnidtzL71ZA
Channel Id: undefined
Length: 7min 58sec (478 seconds)
Published: Sat Dec 22 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.