Skip to content

Commit beb8810

Browse files
committed
Added Android OnLoad
1 parent dbda78a commit beb8810

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/host/android/src/main/cpp/OnLoad.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,17 @@
33
#include <ReactCommon/CxxTurboModuleUtils.h>
44

55
#include <CxxNodeApiHostModule.hpp>
6+
#include <RuntimeNodeApiAsync.hpp>
67
#include <WeakNodeApiInjector.hpp>
78

89
// Called when the library is loaded
9-
jint JNI_OnLoad(JavaVM *vm, void *reserved) {
10+
jint JNI_OnLoad(JavaVM* vm, void* reserved) {
1011
callstack::nodeapihost::injectIntoWeakNodeApi();
1112
// Register the C++ TurboModule
1213
facebook::react::registerCxxModuleToGlobalModuleMap(
1314
callstack::nodeapihost::CxxNodeApiHostModule::kModuleName,
1415
[](std::shared_ptr<facebook::react::CallInvoker> jsInvoker) {
16+
callstack::nodeapihost::setCallInvoker(jsInvoker);
1517
return std::make_shared<callstack::nodeapihost::CxxNodeApiHostModule>(
1618
jsInvoker);
1719
});

0 commit comments

Comments
 (0)