public static class ReactInstanceManager.Builder
extends java.lang.Object
ReactInstanceManagerImpl| Modifier and Type | Field and Description |
|---|---|
protected android.app.Application |
mApplication |
protected NotThreadSafeBridgeIdleDebugListener |
mBridgeIdleDebugListener |
protected LifecycleState |
mInitialLifecycleState |
protected java.lang.String |
mJSBundleFile |
protected java.lang.String |
mJSMainModuleName |
protected java.util.List<ReactPackage> |
mPackages |
protected boolean |
mUseDeveloperSupport |
| Modifier | Constructor and Description |
|---|---|
protected |
ReactInstanceManager.Builder() |
| Modifier and Type | Method and Description |
|---|---|
ReactInstanceManager.Builder |
addPackage(ReactPackage reactPackage) |
ReactInstanceManager |
build()
Instantiates a new
ReactInstanceManagerImpl. |
ReactInstanceManager.Builder |
setApplication(android.app.Application application)
Required.
|
ReactInstanceManager.Builder |
setBridgeIdleDebugListener(NotThreadSafeBridgeIdleDebugListener bridgeIdleDebugListener) |
ReactInstanceManager.Builder |
setBundleAssetName(java.lang.String bundleAssetName)
Name of the JS bundle file to be loaded from application's raw assets.
|
ReactInstanceManager.Builder |
setInitialLifecycleState(LifecycleState initialLifecycleState)
Sets the initial lifecycle state of the host.
|
ReactInstanceManager.Builder |
setJSBundleFile(java.lang.String jsBundleFile)
Path to the JS bundle file to be loaded from the file system.
|
ReactInstanceManager.Builder |
setJSMainModuleName(java.lang.String jsMainModuleName)
Path to your app's main module on the packager server.
|
ReactInstanceManager.Builder |
setUseDeveloperSupport(boolean useDeveloperSupport)
When
true, developer options such as JS reloading and debugging are enabled. |
protected final java.util.List<ReactPackage> mPackages
@Nullable protected java.lang.String mJSBundleFile
@Nullable protected java.lang.String mJSMainModuleName
@Nullable protected NotThreadSafeBridgeIdleDebugListener mBridgeIdleDebugListener
@Nullable protected android.app.Application mApplication
protected boolean mUseDeveloperSupport
@Nullable protected LifecycleState mInitialLifecycleState
public ReactInstanceManager.Builder setBundleAssetName(java.lang.String bundleAssetName)
"index.android.js"public ReactInstanceManager.Builder setJSBundleFile(java.lang.String jsBundleFile)
"assets://index.android.js" or "/sdcard/main.jsbundlepublic ReactInstanceManager.Builder setJSMainModuleName(java.lang.String jsMainModuleName)
"index.android" or
"subdirectory/index.android"public ReactInstanceManager.Builder addPackage(ReactPackage reactPackage)
public ReactInstanceManager.Builder setBridgeIdleDebugListener(NotThreadSafeBridgeIdleDebugListener bridgeIdleDebugListener)
public ReactInstanceManager.Builder setApplication(android.app.Application application)
Application instance.public ReactInstanceManager.Builder setUseDeveloperSupport(boolean useDeveloperSupport)
true, developer options such as JS reloading and debugging are enabled.
Note you still have to call ReactInstanceManager.showDevOptionsDialog() to show the dev menu,
e.g. when the device Menu button is pressed.public ReactInstanceManager.Builder setInitialLifecycleState(LifecycleState initialLifecycleState)
public ReactInstanceManager build()
ReactInstanceManagerImpl.
Before calling build, the following must be called: