From 56b1d0009adae3a5da0a541938a4c11846c5f427 Mon Sep 17 00:00:00 2001 From: Elliot Hesp Date: Fri, 17 Mar 2017 14:39:50 +0000 Subject: [PATCH 1/2] 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: +``` + + + + + + + + + + + +``` From 7b7d6a07da3e99edc8ddab3a3ba42f613d0a457c Mon Sep 17 00:00:00 2001 From: Elliot Hesp Date: Fri, 17 Mar 2017 14:58:28 +0000 Subject: [PATCH 2/2] Update README.md --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f95b03de..2cc8f056 100644 --- a/README.md +++ b/README.md @@ -40,12 +40,11 @@ RNFirebase aims to replicate the Firebase Web SDK as closely as possible. Becaus * [Firebase Setup](docs/firebase-setup.md) * API * [Authentication](docs/api/authentication.md) + * [Realtime Database](docs/api/database.md) * [Analytics](docs/api/analytics.md) * [Storage](docs/api/storage.md) - * [Realtime Database](docs/api/database.md) - * [ServerValue](docs/api/server-value.md) * [Messaging](docs/api/cloud-messaging.md) - * [Events](docs/api/events.md) + * [Crash](docs/api/crash.md) ## Contributing