How to create callbacks between android code and native code?
I have a requirement for creating call backs between native code ( c language code) and Android code . I wrote JNI functions for calling C code from the android like this JNI code here #include <android/log.h> void initSocket(); #ifdef __cplusplus extern "C" { #endif JNIEXPORT void JNICALL Java_org_pjsip_pjsua_pjsua_1appJNI_initSocket(JNIEnv *jenv, jclass jcls) { __android_log_write(ANDROID_LOG_INFO, " JNI CODE ", " APP INIT SOCKET"); initSocket(); } } C code looks like this void initSocket() { /// some more stuff printf(" initSocket function "); } static int worker_thread(void *unused) { ///