android jni蓝牙,Android NDK accessing native bluetooth functions bluedroid

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??

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值