bare-bluetooth
Advanced tools
+25
-0
@@ -389,2 +389,6 @@ const bluetooth = require('bare-bluetooth-android') | ||
| .on('notifySent', this._onnotifysent.bind(this)) | ||
| .on('connecting', this._onconnecting.bind(this)) | ||
| .on('connected', this._onconnected.bind(this)) | ||
| .on('disconnecting', this._ondisconnecting.bind(this)) | ||
| .on('disconnected', this._ondisconnected.bind(this)) | ||
| } | ||
@@ -479,2 +483,18 @@ | ||
| } | ||
| _onconnecting(deviceAddress) { | ||
| this.emit('connecting', deviceAddress) | ||
| } | ||
| _onconnected(deviceAddress) { | ||
| this.emit('connected', deviceAddress) | ||
| } | ||
| _ondisconnecting(deviceAddress) { | ||
| this.emit('disconnecting', deviceAddress) | ||
| } | ||
| _ondisconnected(deviceAddress) { | ||
| this.emit('disconnected', deviceAddress) | ||
| } | ||
| } | ||
@@ -500,2 +520,7 @@ | ||
| Server.CONNECTION_STATE_DISCONNECTED = bluetooth.Server.CONNECTION_STATE_DISCONNECTED | ||
| Server.CONNECTION_STATE_CONNECTING = bluetooth.Server.CONNECTION_STATE_CONNECTING | ||
| Server.CONNECTION_STATE_CONNECTED = bluetooth.Server.CONNECTION_STATE_CONNECTED | ||
| Server.CONNECTION_STATE_DISCONNECTING = bluetooth.Server.CONNECTION_STATE_DISCONNECTING | ||
| Server.ATT_SUCCESS = bluetooth.Server.ATT_SUCCESS | ||
@@ -502,0 +527,0 @@ Server.ATT_INVALID_HANDLE = bluetooth.Server.ATT_INVALID_HANDLE |
+2
-2
| { | ||
| "name": "bare-bluetooth", | ||
| "version": "0.1.0", | ||
| "version": "0.2.0", | ||
| "description": "Bluetooth bindings for Bare", | ||
@@ -35,3 +35,3 @@ "exports": { | ||
| "dependencies": { | ||
| "bare-bluetooth-android": "^0.4.0", | ||
| "bare-bluetooth-android": "^0.5.0", | ||
| "bare-bluetooth-apple": "^0.3.0" | ||
@@ -38,0 +38,0 @@ }, |
+13
-0
@@ -366,2 +366,6 @@ > [!IMPORTANT] | ||
| | --------------- | ----------------------------------------- | -------- | | ||
| | `connecting` | `deviceAddress: string` | Android | | ||
| | `connected` | `deviceAddress: string` | Android | | ||
| | `disconnecting` | `deviceAddress: string` | Android | | ||
| | `disconnected` | `deviceAddress: string` | Android | | ||
| | `notifySent` | `deviceAddress: string`, `status: number` | Android | | ||
@@ -383,2 +387,11 @@ | `readyToUpdate` | _(none)_ | Apple | | ||
| #### Connection state (Android) | ||
| | Constant | Value | | ||
| | --------------------------------------- | ----- | | ||
| | `Server.CONNECTION_STATE_DISCONNECTED` | `0` | | ||
| | `Server.CONNECTION_STATE_CONNECTING` | `1` | | ||
| | `Server.CONNECTION_STATE_CONNECTED` | `2` | | ||
| | `Server.CONNECTION_STATE_DISCONNECTING` | `3` | | ||
| #### Properties | ||
@@ -385,0 +398,0 @@ |
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.
49971
3.19%887
2.31%519
2.57%0
-100%+ Added
- Removed