黃小黃
黃小黃

Reputation: 11

How to connect two Bluetooth BLE devices in android?

I want to use Bluetooth BLE to receive data from heart rate and send a command to second device. I write two program acccording to android sample(http://developer.android.com/samples/BluetoothLeGatt/index.html). first program is to use the android to receive heart from A device by bluetooth. second program is to use the android to send command to B device by bluetooth. I merge two Bluetooth service into one program. but it seems not work. i created, one BluetoohManager, one BluetoothAdapter, two service classes,two BroadcastReceiver, two BluetoohDevices. I don't if it is the right way. it seems not work. Does anyone have some code example? or does someone can tell me how to modify the android code example (BluetoothLeGatt) to deal two bluetooth devices?

Upvotes: 1

Views: 1365

Answers (1)

Zeeshan Saiyed
Zeeshan Saiyed

Reputation: 466

We have some of the best libraries available for bluetooth communication, this might help you

Bluetooth LE Library for Android

SmartGattLib

android-btxfr

Android-BluetoothSPPLibrary

Android-Bluetooth-Library

Upvotes: 2

Related Questions