mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-06 22:38:37 +08:00
Allow installing JS binding via the RN Android bridge
Reviewed By: fkgozali Differential Revision: D6979072 fbshipit-source-id: 8b4ac3769496a6a6fe3dd9ee2aac64b66604c413
This commit is contained in:
committed by
Facebook Github Bot
parent
ecc08adf49
commit
db391a500c
@@ -16,6 +16,7 @@ import java.util.List;
|
||||
import android.app.Application;
|
||||
|
||||
import com.facebook.infer.annotation.Assertions;
|
||||
import com.facebook.react.bridge.BridgeListener;
|
||||
import com.facebook.react.bridge.JavaScriptExecutorFactory;
|
||||
import com.facebook.react.bridge.ReactMarker;
|
||||
import com.facebook.react.bridge.ReactMarkerConstants;
|
||||
@@ -76,6 +77,7 @@ public abstract class ReactNativeHost {
|
||||
.setRedBoxHandler(getRedBoxHandler())
|
||||
.setJavaScriptExecutorFactory(getJavaScriptExecutorFactory())
|
||||
.setUIImplementationProvider(getUIImplementationProvider())
|
||||
.setBridgeListener(getBridgeListener())
|
||||
.setInitialLifecycleState(LifecycleState.BEFORE_CREATE);
|
||||
|
||||
for (ReactPackage reactPackage : getPackages()) {
|
||||
@@ -122,6 +124,10 @@ public abstract class ReactNativeHost {
|
||||
return new UIImplementationProvider();
|
||||
}
|
||||
|
||||
protected @Nullable BridgeListener getBridgeListener() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the name of the main module. Determines the URL used to fetch the JS bundle
|
||||
* from the packager server. It is only used when dev support is enabled.
|
||||
|
||||
Reference in New Issue
Block a user