Question

I am using the android/log.h methods in my native code to write to the android log (__android_log_write(ANDROID_LOG_INFO, ANDROID_DEBUG_TAG, message);). I am also doing logging in the Java code. However, when running, only the log messages from the Java code is displayed in the logger. What could cause these problems?

I have set all the required info in the android-manifest, and the rest of the native code runs fine in my android app. I don't get any errors or anything either, it just seems silently ignored.

Any ideas?

Thanks

Was it helpful?

Solution

I'm not sure, but I use __android_log_print in my NDK code and that works fine. I don't know the difference between the two methods off the top of my head, but give that a try (it takes the same arguments).

OTHER TIPS

In order to use __android_log_print(...), include the log library in your Android makefile

LOCAL_LDLIBS := -llog
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top