douglasjunior / AndroidBluetoothLibrary

A Library for easy implementation of Serial Bluetooth Classic and Low Energy on Android. 💙
MIT License
224 stars 68 forks source link

Question: Is it possible to connect to a device using a MAC address without scanning? #12

Closed kazmi closed 6 years ago

kazmi commented 6 years ago

I know the mac addresses of the devices I need to connect to.

douglasjunior commented 6 years ago

You can get the device with de BluetoothAdapter.

BluetoothDevice device = mBluetoothAdapter.getRemoteDevice(macAddress);

mBluetoothService.connect(device);