public interface NativeModule
NativeModule
s whose
implementation is written in Java should extend BaseJavaModule
or ReactContextBaseJavaModule
. NativeModule
s whose implementation is written in C++
must not provide any Java code (so they can be reused on other platforms), and instead should
register themselves using CxxModuleWrapper
.Modifier and Type | Interface and Description |
---|---|
static interface |
NativeModule.NativeMethod |
Modifier and Type | Method and Description |
---|---|
boolean |
canOverrideExistingModule()
Return true if you intend to override some other native module that was registered e.g.
|
java.lang.String |
getName() |
void |
initialize()
This is called at the end of
CatalystApplicationFragment#createCatalystInstance()
after the CatalystInstance has been created, in order to initialize NativeModules that require
the CatalystInstance or JS modules. |
void |
onCatalystInstanceDestroy()
Called before {CatalystInstance#onHostDestroy}
|
java.lang.String getName()
require()
this module
from javascript.void initialize()
CatalystApplicationFragment#createCatalystInstance()
after the CatalystInstance has been created, in order to initialize NativeModules that require
the CatalystInstance or JS modules.boolean canOverrideExistingModule()
void onCatalystInstanceDestroy()