react-native-bluetooth-devices
TypeScript icon, indicating that this package has built-in type declarations

0.1.7 • Public • Published

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

Package Sidebar

Install

npm i react-native-bluetooth-devices

Weekly Downloads

8

Version

0.1.7

License

MIT

Unpacked Size

32.8 kB

Total Files

19

Last publish

Collaborators

  • spicy_sparks