From 56b1d0009adae3a5da0a541938a4c11846c5f427 Mon Sep 17 00:00:00 2001 From: Elliot Hesp Date: Fri, 17 Mar 2017 14:39:50 +0000 Subject: [PATCH] Update Android installation instructions --- docs/installation.android.md | 55 +++++++++++++++++++++++++----------- 1 file changed, 38 insertions(+), 17 deletions(-) diff --git a/docs/installation.android.md b/docs/installation.android.md index eb58e15a..efc16b9a 100644 --- a/docs/installation.android.md +++ b/docs/installation.android.md @@ -1,6 +1,6 @@ # Android Installation -The simplest way of installing on Android is to use React Native linker: +The simplest way of installing on Android is to use the react-native link CLI command & rebuild the project: ``` react-native link react-native-firebase @@ -38,24 +38,45 @@ dependencies { } ``` -Add to `AndroidManifest.xml` file -```diff - -+ -+ -+ -+ -+ +Add the project path to `android/settings.gradle`: -+ -+ -+ -+ -+ -``` - -Add to `android/settings.gradle` ``` include ':react-native-firebase' project(':react-native-firebase').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-firebase/android') ``` + +If you plan on using [Firebase Cloud Messaging](https://firebase.google.com/docs/cloud-messaging/), add the following to `android/app/src/main/AndroidManifest.xml`. + +Add permissions: +``` + + + + +``` + +Set app [launch mode](https://inthecheesefactory.com/blog/understand-android-activity-launchmode/en) inside application props: +``` + +``` + +Add messaging service: +``` + + + + + + + + + + + +```