Connect New Firebase Project To Android Application

Firebase is a mobile and web application development platform that provides developers with a great tools and services to help them develop high-quality applications, grow their user base, and earn more profit.

We learned how to Get Started with Firebase And How to add Firebase Dependency to our Android Application, In this Post we will learn how to connect A New Firebase Project To Our Application Using Android Studio.

Firebase Project

  • Click ” Add project ” :

Firebase Project

  • Project ID should be unique .
  • Enter Project Name and check all then Click ” Create project ” :

Firebase Project

  • Wait :

Firebase Project

  • Click ” Continue ” :

Firebase Project

  • Click on the small Android Icon to add an app to get started :

Firebase Project

  • Enter Your Application Package Name.
  • Choose Application Name.
  • Enter Your Application SHA-1.

To get Your Application package name

  • Go To ” build.gradle ( Module: app ) ” And Copy ” applicationId “.

To get Your Application SHA-1

  1. Click on ” Gradle ” on the right of the image .
  2. Go To ” Andrunicom ” you will fing your package name instead.
  3. Then ” Tasks > android ” Double-Click on ” signingReport ” :

Firebase Project

  •  Copy the Application SHA-1 :

Firebase Project

  • Paste The SHA-1 And Click ” Register app “:

Firebase Project

  • Donwload The Json File by Clicking on ” Download google-services.json “

Firebase Project

  • Copy That File And :
  1. Change Source File Directory From ” Android ” To ” Project ” .
  2. Paste the Json File in The ” app ” Folder – (Don’t Change The Name).

Firebase Project

  • And Click ” Next “:

Firebase Project

  • Add Firebase Dependency, if you don’t know how please go HERE :

Firebase Project

  • Now You Need To Start Your Application in Order To communicate With Firebase Project :

Firebase Project

  • We Need To Add Internet Prmission To use Internet in our Application :

<uses-permission android:name="android.permission.INTERNET" />

Firebase Project

  • Then Start The app  and Wait :

Firebase Project

Congratulations, you’ve successfully added Firebase to your app !

I hope that’s Clear & Simple.

Next Time we will create RealTime Database and use it on our Android Application.

Until thenhave a good time.

Android Dev

Android Developer.

Leave a Reply

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