rn-android-webview
v1.0.2
Published
React Native WebView for Android, enable file choose
Downloads
6
Maintainers
Readme
rn-android-webview
Getting started
$ npm install rn-android-webview --save
Mostly automatic installation
$ react-native link rn-android-webview
Manual installation
Android
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.chyrain.rn.webview.RNAAndroidWebviewPackage;
to the imports at the top of the file - Add
new RNAAndroidWebviewPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':rn-android-webview' project(':rn-android-webview').projectDir = new File(rootProject.projectDir, '../node_modules/rn-android-webview/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':rn-android-webview')
Usage
import RNAAndroidWebview from 'rn-android-webview';
// TODO: What to do with the module?
RNAAndroidWebview;