I\'m trying to write my own jni sources. Looking at some ndk samples, I found that they often use those macros JNIEXPORT and JNICALL follewed by the name of java package lik
You can find the definition of those macros in the machine-dependent portion of your JNI includes (usually in $JAVA_HOME/include/).
In short, JNIEXPORT contains any compiler directives required to ensure that the given function is exported properly. On android (and other linux-based systems), that'll be empty.
JNICALL contains any compiler directives required to ensure that the given function is treated with the proper calling convention. Probably empty on android as well (it's __stdcall on w32).
In general, you should leave them in, even if they're empty #defines.