Category : bluetooth

I want to do Android bluetooth connection using only JNI (C++ Android NDK code), I found this reference: https://android.googlesource.com/platform/packages/apps/Bluetooth/+/refs/heads/master/jni/com_android_bluetooth.h But I couldn’t find how to use or call it. Is there any way to get bluetooth adapter only using Android JNI? Source: Windows Que..

Read more

I am currently using this code to discover, then start up a connection with a bluetooth device using the winsock2 API: constexpr BLUETOOTH_DEVICE_SEARCH_PARAMS btDeviceSearchParameters = { sizeof(BLUETOOTH_DEVICE_SEARCH_PARAMS), 1, 0, 1, 1, 1, 2, nullptr }; BLUETOOTH_DEVICE_INFO btDeviceInfo = {sizeof(BLUETOOTH_DEVICE_INFO), {0}}; const HBLUETOOTH_DEVICE_FIND btDevice = BluetoothFindFirstDevice(&btDeviceSearchParameters, &btDeviceInfo); if (btDevice == nullptr) { printf("Could not find any ..

Read more

I am currently using this code to discover, then start up a connection with a bluetooth device: constexpr BLUETOOTH_DEVICE_SEARCH_PARAMS btDeviceSearchParameters = { sizeof(BLUETOOTH_DEVICE_SEARCH_PARAMS), 1, 0, 1, 1, 1, 2, nullptr }; BLUETOOTH_DEVICE_INFO btDeviceInfo = {sizeof(BLUETOOTH_DEVICE_INFO), {0}}; const HBLUETOOTH_DEVICE_FIND btDevice = BluetoothFindFirstDevice(&btDeviceSearchParameters, &btDeviceInfo); if (btDevice == nullptr) { printf("Could not find any bluetooth devices"); *addr = ..

Read more