Skip to content

Spicy-Sparks/react-native-bluetooth-devices

Repository files navigation

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published