I'm trying to see what sort of native bluetooth functions i can access using JNI and Android NDK. I've tried two different approaches: Using a prebuilt .so or building my own. As far as using a prebuilt .so I've pulled libbluetooth_jni.so off a Samsung Galaxy S4 using adb pull. However, I cannot find the source code for this (bluetooth_jni.c??) online and can't identify any accessible functions.
Secondly, I tried to download the source for bluedroid from
https://android.googlesource.com/platform/external/bluetooth/bluedroid/
However, I am having trouble building this.
Currently when I try to run ndk-build, I get the following errors:
undefined reference to '__android_log_print'
undefined reference to 'socket_local_client_connect'
undefined reference to 'str_parms_destroy'
I added to this line:
LOCAL_LDLIBS := -llog
and it got rid of the first error. However, I'm not sure how to get rid of the others.
Can anyone give me some advice on how to compile or otherwise get an .so in order to access native bluetooth functions??