> For the complete documentation index, see [llms.txt](https://jk-bazar-mart.gitbook.io/funto-spin-doc-v1/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jk-bazar-mart.gitbook.io/funto-spin-doc-v1/firebase-setup.md).

# Firebase Setup

There are various services offered online such as storage, online processing, realtime database, authorisation of user etc. Google developed a platform called **Firebase** that provide all these online services. It also gives a daily analysis of usage of these services along with the details of user using it.

To simplify, it can be said that Firebase is a mobile and web application development platform. It provides services that a web application or mobile application might require. Anyone can easily include firebase to there application and it will make their online work way easier than it was used to be.

There are **two ways to add firebase** to any Android app:

**Using Firebase Assistant**

Below are the steps to include Firebase to Android project in Android studio:

* **Update** the android studio (>= 2.2)
* Create a **new project** in the firebase by clicking on the Add project.

![](https://media.geeksforgeeks.org/wp-content/uploads/create.png)

* Now open the android studio and click on **Tools** in the upper left corner.

![](https://media.geeksforgeeks.org/wp-content/uploads/Untitled-81.png)

* Now click on the **Firebase** option in the drop down menu.

![](https://media.geeksforgeeks.org/wp-content/uploads/Untitled-82.png)

* A menu will appear on the right side of screen. It will show various **services** that Firebase offers. Choose the desired service.
* Now Click on the **Connect to Firebase** option in the menu of desired service.

![](https://media.geeksforgeeks.org/wp-content/uploads/Untitled-84-1024x692.png)

* Add the dependencies of your service by clicking on the **Add \[YOUR SERVICE NAME] to the app option**. (In the image below, the Firebase cloud messaging service is chosen)

![](https://media.geeksforgeeks.org/wp-content/uploads/Untitled-83-1024x693.png)

#### Manually adding firebase

In this, the steps involve:

* Create a firebase project
* Create a project by clicking on **create project** in the firebase console.

![](https://media.geeksforgeeks.org/wp-content/uploads/create-1024x688.png)

* Fill the necessary details in the pop up window about the project. Edit the project ID if required.

![](https://media.geeksforgeeks.org/wp-content/uploads/oie_XB98ogr2aMX3-1024x530.png)

* Click on create project to finally create it.

* Now add this project to the android app

* [ ] Click on the **Add firebase to your android app** option on the starting window.

![](https://media.geeksforgeeks.org/wp-content/uploads/2nd-1024x607.png)

* A prompt will open where to enter the package name of the app.
* Now the app is connected to the Firebase. Now all the cloud based as well server based services can be easily used in the app.
* Now the app will be registered with firebase.
* Also, the SHA1 certificate, can be given, of the app by following steps:

  ```
  Go to android studio project
   ↳ gradle
     ↳ root folder
       ↳ Tasks
         ↳ Android
           ↳ signingReport
             ↳ copy paste SHA1 from console
             
         
  ```

![](https://media.geeksforgeeks.org/wp-content/uploads/step-6-2-1024x549.png)

* Now download the **google-services.json** file and place it in the root directory of the android app.

![](https://media.geeksforgeeks.org/wp-content/uploads/3rd.png)
