Bug(s) or Feature(s)

Getting Started


Introduction

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.

IOS

The hardware in which my company was working would only communicate over Bluetooth Classic and required 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

The Android functionality is pretty common and well documented, there are a number of examples which can be reviewed:

Working Versions

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:

<bluetooth-classic-version>.<lowest-react-native-version>.<release-version>

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 1.72.x for example.
  • 5 releases within the previous grouping

Versions

VersionReact NativeAndroidIOSBranch
0.9.x0.59.94.1 (16)IOS 9releases/0.9.x
0.10.x0.60.04.1 (16)IOS 9releases/0.10.x
1.60.x0.60.08.0 (24)IOS 9master

Caveat

It may be possible to use the library in lower versions that those noted, if you confirm it working, please submit a pull request with updated version details.

Changes

Please see the change log for complete(ish) details.

Installation

Installation, like almost everything, is done through npm:

$ 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.

Manual Linking / Customization

There may be times where overriding autolinking is required, for those examples please see the specific android and ios APi(s).

Contribute

Issues / Enhancements

Feel free to submit any issues or enhancements through Github. Please follow the provided templates (respective) and provide as much information as you can:

  • stack trace
  • images
  • example(s)/repositories
  • etc.

Pull Requests

Feel free to submit any pull requests. Try to document which issue (if any) it resolves, or provide some details on what you're adding. I regularly try to look at the forks to see what changes there are and if there is value in adding them to the project.

Please update it accordingly when submitting a pull request!!