Hi Sylvain,
I'm confused why you will use android.os.Handler ?
But nevertheless : Yes, you can make a kind of callback from you
native ndk stuff.
Simply provide a public call in your own "JNI-Handler" class i.e.
public void onEvent(int event) {
..
}
and in your Thread ( C-Code example )
// as a kind of pseudo code without error handlng
int event_mask; // your event-mask
jclass cls;
cls = (*env)->FindClass(env, "<yourpackage>/<yourhandler>");
jmethodID mid = (*env)->GetMethodID(env, cls, "onEvent", "(I)V");
(*env)->CallVoidMethod(env, obj , mid ,event_mask);
And your "Handler" calls you can use the Android Handler in the normal
way.
Good luck ! Frank