How to Integrate Firebase in Our React Native Application🧨
Published: 2024-03-28 08:38:57


In this article we will see how can we integrate firebase in our React Native Application.
To do this we will follow these step

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/812zz8d6ev6asup6ez6y.png)


Setp 1
We have to create React Native Application
command to create react native application
npx react-native@latest init Awesomeapp
Step 2
After creating React Native Application we have to create/login firebase account.
Go to Console


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yolxyb2tvwv869ytmhqa.png)




Firebase Home Screen
2. Click on Create Project


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xhlxlhkwdr5fx1rmmekw.png)



firebase create project screen
3. Go to Android icon


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/70jy80txr4ugktotbegb.png)




Main project setting screen
4.Give your Android package name and SH1 key


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nrv3gz4gtzhbn3gzk3pp.png)



Register App screen
5. Path to get package name
android/app/scr/main/java/MainActivity.kt
package name

`android/app/scr/main/java/MainActivity.kt`


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/27l2mo3stg42t8l5js66.png)



Android package name
If you want to generate SH1 key then follow this article
Article Link:-

[](https://medium.com/@anwarnadeem2010/how-to-generate-sh1-key-in-react-native-app-9165d7f203a2)



How to Generate SH1 Key in React Native App 🚀
Hello Everyone in this article we will know how to generate SH1 in React native Application.
medium.com
fastest way to generate SH1 key
Go to android directory and run this command 

`./gradlew signingReport`

You will see your sh1 key is generated successfully
After Generating SH1 next step is click continue


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gxi2mhzdzoc6injgsed3.png)




Download this file
6. Download google-service.json


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xkqhz4ib9p32wga426ic.png)



Add this file to given path
7. After Downloading file put google-service.json file to android/app folder
Go to rnfirebase page
Link: — https://rnfirebase.io/
React Native Firebase | React Native Firebase
Welcome to React Native Firebase! To get started, you must first setup a Firebase project and install the “app” module.
rnfirebase.io
Install this library
`npm install --save @react-native-firebase/app
`We need to do 2 more thing
Add this line of code into 2 file
Add this line into android/build.gradle
Add below in android/build.gradle
`classpath 'com.google.gms:google-services:4.4.1'
`


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cz144ynmu75l96zgpjj2.png)


2. Add below code into android/app/build.gradle
`apply plugin: 'com.google.gms.google-services'
`

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5v9ujc8g59bi1cs3gs6e.png)



`implementation(platform("com.google.firebase:firebase-bom:32.7.3"))`


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zxx1boo5bmehaib6bfmd.png)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/meqf6wkruax06j40snqe.png)





Now firebase setup has been successfully done
For checking this .
Just go to android studio and sync your project if you don’t get error means you have successfully integrate firebase into your project.
Thank you for reading until the end. Before you go:
Please consider clapping and following the writer!
Follow us | [LinkedIn](https://in.linkedin.com/in/mdnadeemanwards2023)
More content at [Medium.com](https://medium.com/@anwarnadeem2010)