How to register C++ React Native module in Android

(Kirill Lebedev) #1

I have a C++ React Native module derived from facebook::xplat::module::CxxModule. It is working ok with iOS project but now I’m trying to figure out how to use it from Java. The only documentation I found is the comment in React Native codebase stating that:

NativeModules 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

My question is how to register C++ module in Java using CxxModuleWrapper

(Mikael Sand) #2

You can see an example here: