Integrate Firebase SDK in React Native Android Project

Hello friends, First of all thanks for reading our tutorials and making our website popular among developers. In today’s tutorial we would discuss about a new topic in react native which is Firebase. As we all know firebase is a product of Google. Firebase is used to create web and mobile applications without spending a penny on internet. Firebase provides us many facilities like Firebase Login, Firebase Analytics, Firebase image hosting, Firebase data hosting etc. But to use its services we have to first configure the Firebase in our react native application. Friends I’m telling you its one of the most popular platform between developers who which to add different type of functionalities in their application. So in this tutorial we would learn about Integrate Configure Firebase SDK in React Native Android application.

Contents in this project Example of Integrate Configure Firebase SDK in React Native Android App:

1. The first step is to open the firebase console in your web browser. Here is the link of Firebase Console. Login from your Google Gmail Account.

2. After successfully login from your Gmail credentials, You’ll see a window to create new Firebase project. If you have already use Firebase then you’ll seen a recent project window. So click on Add Project.


3. Enter your project name, I’m creating a new project named as My Firebase Project.

4. Switch on Enable Google Analytics for this project and click on Continue.

5. Now we have to configure Google Analytics in our current firebase project. Enable all the steps and select your country and make a new google analytics account like I did in below screenshot. Hit on Create Project.

6. Here you go friends, Now your new Firebase project is successfully created. Click to Continue to start configuring your products.

7. Now first we would add Firebase in our React Native Android project. So click on Android Icon present on screen to start integrating firebase on react native android app.

8. Now on the next step, we have to add our React native android project package name. The package name should be found in Your_React_Native_Project -> android -> app -> src -> main -> AndroidManifest.xml . Now we have to add the SHA-1 Certificate. Read my this tutorial about Get SHA-1 Certificate from Easiest Way using CMD and Android Studio.

9. On the next step we have to download google-services.json file and put the file inside React_Native_App -> android -> app folder.

10. Now we have to add Firebase SDK in our react native project. Follow all the steps given below and make sure you select JAVA in below section.

11. Source code of my React Native Project / android / build.gradle file.

12. Source code for my React Native Project / android / app / build.gradle file.

13. Now we have to open our React Native Project Android project in Android Studio to sync Gradle and download and import all the necessary tool for using firebase in our react native project.

14. Select your android project directory and click OK.

15. It might take a few minutes to opening your project in Android Studio. Now you’ll see a Sync Icon present on your Android Studio screen. Click on Sync Now and it will download the latest Gradle version and integrate firebase in your react native project.

16. After done Sync process your project is ready to use with Firebase. Now hit the Continue to Console button to locate in your Google Firebase project console.

Hooray guys, Now your android project is ready to use with firebase. Now visit https://rnfirebase.io/ and install the latest firebase NPM package in your project.