I would like to debug a JNI C application by inserting log messages to logcat. What is the C API that does this?
Like this:
#include <android/log.h>
__android_log_write(ANDROID_LOG_ERROR, "Tag", "Error here");//Or ANDROID_LOG_INFO, ...
Add it to your makefile like this:
LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -llog