react-native-bluetooth-headset-detect
Bluetooth Headset Detection for React Native
Getting started
$ npm install react-native-bluetooth-headset-detect --save
If you use react-native < 0.60
$ react-native link react-native-bluetooth-headset-detect
Usage
With React hooks:
; const MyComponent = { const device = ; return <Text>Connected headset: device</Text> ;};
Without React hooks:
; console;;
Legacy (not recommended):
; const BluetoothHeadsetDetectModule = NativeModulesRNBluetoothHeadsetDetect;const bluetoothHeadsetDetectEmitter = BluetoothHeadsetDetectModule;bluetoothHeadsetDetectEmitter;
Demo project
https://github.com/alexkorep/react-native-bluetooth-headset-detect-demo