Android Getting Started with Firebase – Android Login using Firebase

Firebase is getting more and more popular these days. Firebase provides many services like authentication, real-time database etc. In the days of mysql, it was very difficult to manage users and we have to do lots of work to achieve it like building REST API then handling errors takes that to more complexity but with firebase, you can instantly add login functionality to your application with very few lines of code. So in this post, I will be demonstrating android login using firebase. So let’s get started

Download source code and output apk from following link

Here is video showing output of what we are going to build

Android Getting Started with Firebase – Android Login using Firebase

1. I am assuming that you have already connected your project to firebase. If you don’t know how to connect your project to fire base refer this post How to add Firebase to your android app and then come back and continue here.

2. Now create new class package name=>LoginActivity.java which will be our login activity paste below lines in it

 

Create new layout in layout=>activity_login.xml and paste below lines in it

 

android login using firebase - Login Screen

3. Now create new class package name=>RegisterActivity.java which will be our registration activity paste below lines in it

 

Create new layout in layout=>activity_register.xml and paste below lines in it

 

android login using firebase - Registration screen

4. Now create new class package name=>MainActivity.java which will be our registration activity paste below lines in it

 

Create new layout in layout=>activity_main.xml and paste below lines in it

 

android login using firebase - Screen with login Information

5.Inside manifest.xml paste below lines

 

6.Inside values=>colors.xml paste below lines

 

7.Inside values=>styles.xml paste below lines

 

8.Inside values=>strings.xml

 

10. Now run your application and see the results If you still have any queries, please post them in the comments section below, I will be happy to help you.

Share this post

Hello there, My name is Amardeep founder of loopwiki.com. I have experience in many technologies like Android, Java, Php etc. In this variety of technologies, I love Android App Development. If you have any idea and you want me to develop for you then let’s have chat Email: [email protected]

Leave a Reply

Your email address will not be published. Required fields are marked *