This diff makes it possible to expose C++ static methods to java. A first example of such a method will be added in the next diff.
Details
Compile the app - it should not crash.
Diff Detail
- Repository
- rCOMM Comm
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
native/android/app/src/cpp/jsiInstaller.cpp | ||
---|---|---|
64–69 ↗ | (On Diff #9394) | When I tried to have a separate method JNI_OnLoad in GlobalNetworkSingletonJNIHelper it was not possible to locate the exposed method (unsatisfied link), so it looks like we need to have only one JNI_OnLoad per library. I could verify that, but I don't think that having a single point where all the natives are registered is a bad thing - it reduces the chances of conflicts, or make finding conflicts easier. |
native/android/app/src/cpp/GlobalNetworkSingletonJNIHelper.cpp | ||
---|---|---|
5–6 | nit |
I really don't know much about what's going on here... @karol-bisztyga and @palys-swm are the only ones on the team who have really explored Android JNI generally or fbjni specifically. Adding @jimpo since I know he's done some Android stuff, but not sure if he has context. Will accept, deferring to @karol-bisztyga and @palys-swm.