Skip to content
This repository has been archived by the owner on Jun 11, 2020. It is now read-only.

Use community react-native-webview #28

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@ repositories {

dependencies {
compile 'com.facebook.react:react-native:+'
implementation(project(':react-native-webview'))
testCompile 'junit:junit:4.12'
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@
import com.facebook.react.uimanager.events.ContentSizeChangeEvent;
import com.facebook.react.uimanager.events.Event;
import com.facebook.react.uimanager.events.EventDispatcher;
import com.facebook.react.views.webview.WebViewConfig;
import com.facebook.react.views.webview.events.TopLoadingErrorEvent;
import com.facebook.react.views.webview.events.TopLoadingFinishEvent;
import com.facebook.react.views.webview.events.TopLoadingStartEvent;
import com.facebook.react.views.webview.events.TopMessageEvent;
import com.reactnativecommunity.webview.WebViewConfig;
import com.reactnativecommunity.webview.events.TopLoadingErrorEvent;
import com.reactnativecommunity.webview.events.TopLoadingFinishEvent;
import com.reactnativecommunity.webview.events.TopLoadingStartEvent;
import com.reactnativecommunity.webview.events.TopMessageEvent;

import org.json.JSONObject;
import org.json.JSONException;
Expand Down
12 changes: 6 additions & 6 deletions androidWebView.js
Original file line number Diff line number Diff line change
Expand Up @@ -330,15 +330,15 @@ class WebView extends React.Component {
goForward = () => {
UIManager.dispatchViewManagerCommand(
this.getWebViewHandle(),
UIManager.RCTWebView.Commands.goForward,
UIManager.RNCWebView.Commands.goForward,
null
);
};

goBack = () => {
UIManager.dispatchViewManagerCommand(
this.getWebViewHandle(),
UIManager.RCTWebView.Commands.goBack,
UIManager.RNCWebView.Commands.goBack,
null
);
};
Expand All @@ -349,23 +349,23 @@ class WebView extends React.Component {
});
UIManager.dispatchViewManagerCommand(
this.getWebViewHandle(),
UIManager.RCTWebView.Commands.reload,
UIManager.RNCWebView.Commands.reload,
null
);
};

stopLoading = () => {
UIManager.dispatchViewManagerCommand(
this.getWebViewHandle(),
UIManager.RCTWebView.Commands.stopLoading,
UIManager.RNCWebView.Commands.stopLoading,
null
);
};

postMessage = data => {
UIManager.dispatchViewManagerCommand(
this.getWebViewHandle(),
UIManager.RCTWebView.Commands.postMessage,
UIManager.RNCWebView.Commands.postMessage,
[String(data)]
);
};
Expand All @@ -379,7 +379,7 @@ class WebView extends React.Component {
injectJavaScript = data => {
UIManager.dispatchViewManagerCommand(
this.getWebViewHandle(),
UIManager.RCTWebView.Commands.injectJavaScript,
UIManager.RNCWebView.Commands.injectJavaScript,
[data]
);
};
Expand Down
2 changes: 1 addition & 1 deletion iosWebView.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { WebView } from 'react-native';
import WebView from 'react-native-webview';

export default WebView;
43 changes: 43 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,8 @@
"bugs": {
"url": "https://github.com/teamairship/react-native-android-fullscreen-webview-video/issues"
},
"homepage": "https://github.com/teamairship/react-native-android-fullscreen-webview-video#readme"
"homepage": "https://github.com/teamairship/react-native-android-fullscreen-webview-video#readme",
"dependencies": {
"react-native-webview": "^5.12.1"
}
}