How to setting up Firebase for Android | React Native

How to setting up firebase for android

if you want to connect your android app, you have to download configuration file and move to your project.

  • Go to firebase console
  • Add android application
  • Enter your projects details
  • Enter Android package name
  • "Android package" same as your local project's package name
  • You can check your local project package name from manifest file.
    path: android/app/src/main/AndroidManifest.xml
  • Now download google-services.json file.
  • Move this file to android/app folder inside your project.
    path: /android/app/google-services.json

Finally you have to enable google-services plugin.
To enable this setting, you need to edit two files in the android folder.

Add dependency to gradle file.
path: /android/build.gradle
buildscript {
  dependencies {
    // ... other dependencies
    classpath 'com.google.gms:google-services:4.2.0'
  }
}

Execute the plugin by adding the following to at end of the /android/app/build.gradle file.
apply plugin: 'com.google.gms.google-services'
Thank you