-
public abstract class ReactNativeHost
Simple class that holds an instance of ReactInstanceManager. This can be used in your class (see ReactApplication), or as a static field.
-
-
Method Summary
Modifier and Type Method Description ReactInstanceManager
getReactInstanceManager()
Get the current ReactInstanceManager instance, or create one. boolean
hasInstance()
Get whether this holder contains a ReactInstanceManager instance, or not. void
clear()
Destroy the current instance and release the internal reference to it, allowing it to be GCed. boolean
getShouldRequireActivity()
Returns whether or not to treat it as normal if Activity is null. SurfaceDelegateFactory
getSurfaceDelegateFactory()
Return the SurfaceDelegateFactory used by NativeModules to get access to a to interact with a surface. abstract boolean
getUseDeveloperSupport()
Returns whether dev mode should be enabled. -
-
Method Detail
-
getReactInstanceManager
ReactInstanceManager getReactInstanceManager()
Get the current ReactInstanceManager instance, or create one.
-
hasInstance
boolean hasInstance()
Get whether this holder contains a ReactInstanceManager instance, or not. I.e. if getReactInstanceManager has been called at least once since this object was createdor clear was called.
-
clear
void clear()
Destroy the current instance and release the internal reference to it, allowing it to be GCed.
-
getShouldRequireActivity
boolean getShouldRequireActivity()
Returns whether or not to treat it as normal if Activity is null.
-
getSurfaceDelegateFactory
SurfaceDelegateFactory getSurfaceDelegateFactory()
Return the SurfaceDelegateFactory used by NativeModules to get access to a to interact with a surface. By default in the mobile platform the it returns is null, and the NativeModule needs to implement its own to decide how it would interact with its own container surface.
-
getUseDeveloperSupport
abstract boolean getUseDeveloperSupport()
Returns whether dev mode should be enabled. This enables e.g. the dev menu.
-
-
-
-