react-native-bluetooth-classic
Advanced tools
Comparing version 1.60.0-rc.3 to 1.60.0-rc.4
@@ -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 @@ |
{ | ||
"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
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
16
1272111
181