react-native-bluetooth-devices
v0.1.7
Published
Get and connect to bluetooth devices using React Native
Downloads
46
Readme
react-native-bluetooth-devices
Get and connect to bluetooth devices using React Native
Installation
npm install react-native-bluetooth-devices
Usage
import BluetoothDevices from "react-native-bluetooth-devices";
// ...
BluetoothDevices.startScan()
BluetoothDevices.addEventListener("onConnectedDevices", (res: {
devices: Array<DeviceType>
}) => {
console.log(res.devices)
BluetoothDevices.connectToDevice(res.devices[0].id)
BluetoothDevices.disconnect()
})
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT