Android NDK: JNI “main” to deal with messages?

Re 2) library is "alive" in the meaning of persisting in the memory. But it does not do anything on its own. If you need the library to "do something" even if no functions are being called through JNI, then you need a separate native thread of course.

You can create the thread and start a message loop within a regular JNI function call (init method or use JNI_OnLoad for that purpose). It will keep on running when the JNI function call returns. You then also need a teardown method which stops the thread and tears it down ( JNI_OnUnload can be used for that).

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions