Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-bluetooth-classic

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-bluetooth-classic - npm Package Compare versions

Comparing version 1.60.0-rc.3 to 1.60.0-rc.4

8

CHANGELOG.md

@@ -7,4 +7,10 @@ # Changelog

## [1.60.1-rc.1]
## [1.60.1-rc.4]
### Edited
- Issue/71 Resolved issue **Invalid Connector Type**
## [1.60.1-rc.3]
Initial release
### Added

@@ -11,0 +17,0 @@

2

package.json
{
"name": "react-native-bluetooth-classic",
"version": "1.60.0-rc.3",
"version": "1.60.0-rc.4",
"description": "Implement bluetooth classic (serial) on Android (Bluetooth Adapter) and IOS (External Accessory)",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -74,6 +74,13 @@

1. Open up `android/app/src/main/java/[...]/MainApplication.java`
As of React Native 0.60.0 **autolinking** should take over. This library has been updated to provide default autolinking configuration, along with the ability to easily override when you require your own implementations.
###### Disable Autolinking
If you want to skip autolinking please follow the documentation provided:
1. Disable auto linking in `react-native.config.js`
2. Open up `android/app/src/main/java/[...]/MainApplication.java`
- Add `import kjd.reactnative.bluetooth.RNBluetoothClassicPackage;` to the imports at the top of the file
- Add `new RNBluetoothClassicPackage()` to the list returned by the `getPackages()` method
2. Append the following lines to `android/settings.gradle`:
3. Append the following lines to `android/settings.gradle`:
```

@@ -83,3 +90,3 @@ include ':react-native-bluetooth-classic'

```
3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
4. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
```

@@ -107,34 +114,2 @@ implementation project(':react-native-bluetooth-classic')

#### @types/react-native
Doesn't have the updated `NativeEventEmitter` declarations. You'll need to update those manually:
- Open up `node_modules/@types/react-native/index.d.ts
- Change the following:
```js
//////////// Plugins //////////////
export const DeviceEventEmitter: DeviceEventEmitterStatic;
// NativeModule needs to be added for NativeEventEmitter
export type NativeModule = {
addListener(eventType: string): void;
removeListeners(count: int): void
}
/**
* This is actually the primary class for dealing with Native events being emitted
* and should be updated. Without this the BluetoothModule will not 'compile'
*/
declare class NativeEventEmitter extends EventEmitter {
constructor(nativeModule?: NativeModule | undefined)
/**
* @param eventType name of the event whose registered listeners to remove
*/
removeAllListeners(eventType: string): void;
}
```
#### Android

@@ -191,3 +166,3 @@

```javascript
import RNBluetoothClassic, { BTEvents, BTCharsets } from 'react-native-bluetooth-classic';
import RNBluetoothClassic, { BluetoothEventType } from 'react-native-bluetooth-classic';
```

@@ -194,0 +169,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc