diff --git a/README.md b/README.md index e92160c6c5af97c22055e2a27a14181a30a3c3c9..d7fec627c674cc48b9c0426b1181caf1e153dd6d 100644 --- a/README.md +++ b/README.md @@ -31,21 +31,22 @@ npm i --save gl-react-native include ':RNGL' project(':RNGL').projectDir = file('../node_modules/gl-react-native/android') ``` -1. `android/app/build.gradle`: Add in dependencies block. +2. `android/app/build.gradle`: Add in dependencies block. ```gradle compile project(':RNGL') ``` -1. in your `MainActivity` (or equivalent): +3. in your `MainActivity` (or equivalent) the RNGLPackage needs to be added. Add the import at the top: ```java import com.projectseptember.RNGL.RNGLPackage; -... - -mReactInstanceManager = ReactInstanceManager.builder() - .setApplication(getApplication()) - ... - .addPackage(new MainReactPackage()) - .addPackage(new RNGLPackage()) - ... - .build(); - +``` +4. In order for React Native to use the package, add it the packages inside of the class extending ReactActivity. +```java +@Override +protected List getPackages() { + return Arrays.asList( + new MainReactPackage(), + ... + new RNGLPackage() + ); +} ```