React Native Bluetooth Classic was developed to bridge the gaps in the available React Native Bluetooth moduless:
are both fantastic implementations but they fall back to BLE on IOS.
The following environments are supported with React Native and this library:
Devices using bluetooth classic and MFi requires communication through the External Accessory framework. Please note that while working with this library on IOS, you'll need to become accustomed with the Apple and their MFi program.
Here are some links to check out:
Android uses the standard BluetoothAdapter for communication:
The project doesn't follow semantic versioning. It started with just some random versioning in order for me to determine the actual best way to do this. The final product moving forward is going to be:
so for example:
1.60.5 would be:
- React Native Bluetooth Classic v1 (breaking changes will increase)
- React Native v60.x - which will remain the current version until React Native provides breaking changes. When this occurs the next version would be
- 5 releases within the previous grouping
The following tables contains the best version availability based on OS type and version:
With how crazy mobile development is, it may or may not be possible to use the library in lower or higher versions that those noted. I will always accept reasonable pull requests that bridge the gap between usable and required versions. This library can also be modified directly in your project and stored within your own project repository if needed.
Please see the change log for complete(ish) details.
Installation, like almost everything, is done through
$ npm install react-native-bluetooth-classic --save
Once installed autolinking will take over within your application.
With the changes in v1.0.0 it's possible that Autolinking doesn't actually work (just be prepared for that). The goal is to have it 100% working and customizable as per the React Native documentation, but until then just beware.
- stack trace
I'm always interested in how people are using this library, and will always accept new pull requests if they are well documented and provide functionality that provides substance. Since there are differenced between Android and IOS, the functionality doesn't need to be available in both (although it should be if possible); if this is the case, it should be fully documented and handled in the React Native module.
Thanks, good luck!!!