Skip to content

Commit d05473d

Browse files
authored
Update android.md
1 parent 9083803 commit d05473d

File tree

1 file changed

+37
-3
lines changed

1 file changed

+37
-3
lines changed

docs/app/android.md

+37-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,43 @@ title: Android Initialization
33
description: Initialization Firebase with Android.
44
---
55

6-
# Android Initialization
6+
# Android Setup
7+
8+
## Manual Android Integration
79

810
> The following steps are only required if your environment does not have access to React Native
9-
auto-linking.
11+
auto-linking.
12+
13+
#### Add App to Gradle Settings
14+
15+
**`android/settings.gradle`**:
16+
```groovy
17+
include ':@react-native-firebase_app'
18+
project(':@react-native-firebase_app').projectDir = new File(rootProject.projectDir, './../node_modules/@react-native-firebase/app/android')
19+
```
20+
21+
#### Add App to App Gradle Dependencies
22+
23+
**`android/app/build.gradle`**:
24+
```groovy{4}
25+
// ..
26+
dependencies {
27+
// ..
28+
implementation project(path: ":@react-native-firebase_app")
29+
}
30+
```
31+
32+
#### Add App to Main Android Application:
33+
34+
**`android/app/src/main/java/**/MainApplication.java`**:
35+
```java{2,8}
36+
// ..
37+
import io.invertase.firebase.app.ReactNativeFirebaseAppPackage;
1038
11-
## TODO
39+
// ..
40+
protected List<ReactPackage> getPackages() {
41+
return Arrays.asList(
42+
new MainReactPackage(),
43+
new ReactNativeFirebaseAppPackage(),
44+
// ..
45+
```

0 commit comments

Comments
 (0)