Skip to content

Commit

Permalink
Merge pull request perrystreetsoftware#13 from kohrongying/enhance/re…
Browse files Browse the repository at this point in the history
…ad-me-android-installation

Update README with android installation details
  • Loading branch information
Epothos333 authored Jul 15, 2019
2 parents 16a4827 + cb74fe7 commit 91ec25f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,20 @@ Because react-native-rtmpview has cocoapod dependencies on third-party video pla
This library now works with Android clients. In your project's `settings.gradle` file, add:

include ':react-native-rtmpview'
project(':react-native-rtmpview').projectDir = new File(rootProject.projectDir, '<path_to>/node_modules/react-native-rtmpview/android')
project(':react-native-rtmpview').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-rtmpview/android')

Then, in your `ReactApplication` class, make sure that the `getPackages()` method includes:
In the `android/app/build.gradle` file, under dependencies, add:
```
implementation project(':react-native-rtmpview')
```
Then, in your `ReactApplication` class, under `MainApplication.java`, import the package and make sure that the `getPackages()` method includes:

new RNRtmpViewPackage()

For example:

import com.perrystreetsoftware.RNRtmpViewPackage;

@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
Expand All @@ -42,6 +48,7 @@ For example:
}



## Example

react-native-rtmpview includes an example project to help get you started. To build and run the example, download or clone the project from github, and then run the following from the root of the project:
Expand Down

0 comments on commit 91ec25f

Please sign in to comment.