Android React Native Setup
Confused about "Android React Native Setup"?
Let us know how we can improve our documentation:
For Android, we’ll be using Firebase Cloud Messaging to power push notifications:
Step 1 - Get your google-services.json
Copied!Confused about "Step 1 - Get your google-services.json"?
Let us know how we can improve our documentation:
Go to the Firebase Console, create a new application OR select an existing project.
Go to
Project Settings
and under theGeneral
tab.Click on
Your Apps
, add an Android application, and download yourgoogle-services.json
file – you need to put this in the root of your projects android directory.
Step 2 - Configure google-services
Copied!Confused about "Step 2 - Configure google-services"?
Let us know how we can improve our documentation:
Put google-services.json
in the root of your project's android directory (e.g. ./android
.
Make sure google-services.json
file is included in your Android project’s dependencies by navigating to your project level build.gradle file (./android/build.gradle
) and adding the following line:
1
2
3
4
5
6
7
8
9
buildscript {
// ...
dependencies {
// ...
classpath 'com.google.gms:google-services:+'
// ...
}
// ...
}
Step 3 - Setup dependencies
Copied!Confused about "Step 3 - Setup dependencies"?
Let us know how we can improve our documentation:
Following the setup instructions mentioned here - https://github.com/zo0r/react-native-push-notification#android-manual-installation
Unlike iOS, the Android emulator does support push notifications - just make sure you use an emulator with Google Play Services installed (shown by the Play Store Icon in the AVD Manager)
