Skip to content

Commit d242dd5

Browse files
committed
Updated README to include Android installation instructions
1 parent dd9ea2e commit d242dd5

File tree

1 file changed

+39
-1
lines changed

1 file changed

+39
-1
lines changed

README.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,45 @@ If you prefer not to use `rnpm`, we can manually link the package together with
6565

6666
### Android
6767

68-
Coming soon
68+
Full Android support is coming soon, as it currently supports a smaller feature-set than the iOS version. Just as we do with iOS, we'll need to install the library using `npm` and call `link` on the library:
69+
70+
```bash
71+
react-native link react-native-firestack
72+
```
73+
74+
Firestack includes the Firebase libraries and will link those directly into our project automatically.
75+
76+
#### Manually
77+
78+
To install `react-native-firestack` manually in our project, we'll need to import the package from `io.fullstack.firestack` in our project's `android/app/src/main/java/com/[app name]/MainApplication.java` and list it as a package for ReactNative in the `getPackages()` function:
79+
80+
```java
81+
package com.appName;
82+
// ...
83+
import io.fullstack.firestack.FirestackPackage;
84+
// ...
85+
public class MainApplication extends Application implements ReactApplication {
86+
// ...
87+
88+
@Override
89+
protected List<ReactPackage> getPackages() {
90+
return Arrays.<ReactPackage>asList(
91+
new MainReactPackage(),
92+
new FirestackPackage()
93+
);
94+
}
95+
};
96+
// ...
97+
}
98+
```
99+
100+
We'll also need to list it in our `android/app/build.gradle` file as a dependency that we want React Native to compile. In the `dependencies` listing, add the `compile` line:
101+
102+
```java
103+
dependencies {
104+
compile project(':react-native-firestack')
105+
}
106+
```
69107

70108
## Firebase setup
71109

0 commit comments

Comments
 (0)