News for hackers. Stuff that matters.
Re:Announcing Rust 1.36.0 by pjmlp on Thursday July 04, 2019 @12:42PM (#20355956)
If your Java usage is constrained to Android there is a JNI workaround that many NDK folks tend to use.

Instead of doing JNI calls, send Android messages between NDK and Framework threads.

There is the setup of MessageHandler on both sides, but long term they are more productive than JNI boilerplate.

Re:Announcing Rust 1.36.0 by mmastrac on Thursday July 04, 2019 @01:12PM (#20356160)
Interesting - do you mean using the Android handler/message infrastructure? I hadn't considered that at all. Do you have any references?
Re:Announcing Rust 1.36.0 by pjmlp on Thursday July 04, 2019 @03:29PM (#20357078)
Yes.

One example would be SDL, although they use a mix of JNI and messages (search for SDLCommandHandler).

http://hg.libsdl.org/SDL/file/abb47c384db3/android-project/a...

http://hg.libsdl.org/SDL/file/abb47c384db3/src/core/android/...

EDIT: Sorry forgot about the C side (counterpart is Android_JNI_SendMessage).