updated android code to work properly

This commit is contained in:
Ali Najafizadeh
2016-02-24 13:24:39 -05:00
parent 14e18a299b
commit 0d3aa9ef12
2 changed files with 7 additions and 4 deletions
@@ -79,13 +79,13 @@ public class WebViewBridgeManager extends ReactWebViewManager {
+ "(function() {"
+ "if (window.WebViewBridge) return;"
+ "var customEvent = document.createEvent('Event');"
+ "WebViewBridge = {"
+ "var WebViewBridge = {"
+ "send: function(message) { WebViewBridgeAndroid.send(message); },"
+ "onMessage: function() {}"
+ "};"
+ "window.WebViewBridge = WebViewBridge;"
+ "customEvent.initEvent('WebViewBridge', true, true);"
+ "document.dispatchEvent(customEvent);"
+"}())", null);
+"}());", null);
}
}