From 219bd73c3389c04d18145bde3f773b822c62846a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=E5=89=91=E4=BE=A0=E5=AE=A2?= Date: Thu, 31 Aug 2023 21:02:24 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=80=82=E9=85=8D=20Android=2013?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E5=A4=8D=E4=B8=8D=E5=AE=89=E5=85=A8=E5=86=85?= =?UTF-8?q?=E5=AD=98=E9=97=AE=E9=A2=98=20(#12)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bluetooth_low_energy/CHANGELOG.md | 5 ++ bluetooth_low_energy/example/pubspec.lock | 22 +++---- bluetooth_low_energy/pubspec.yaml | 12 ++-- bluetooth_low_energy_android/CHANGELOG.md | 5 ++ .../android/build.gradle | 2 +- .../MyBluetoothGattCallback.kt | 46 +++++++++++++-- .../MyCentralController.kt | 59 +++++++++++-------- .../MyScanCallback.kt | 2 + bluetooth_low_energy_android/pubspec.yaml | 4 +- bluetooth_low_energy_darwin/CHANGELOG.md | 5 ++ bluetooth_low_energy_darwin/pubspec.yaml | 4 +- bluetooth_low_energy_linux/CHANGELOG.md | 5 ++ bluetooth_low_energy_linux/pubspec.yaml | 4 +- .../CHANGELOG.md | 5 ++ .../pubspec.yaml | 2 +- bluetooth_low_energy_windows/CHANGELOG.md | 5 ++ bluetooth_low_energy_windows/pubspec.yaml | 4 +- 17 files changed, 136 insertions(+), 55 deletions(-) diff --git a/bluetooth_low_energy/CHANGELOG.md b/bluetooth_low_energy/CHANGELOG.md index 4edec1f..249b009 100644 --- a/bluetooth_low_energy/CHANGELOG.md +++ b/bluetooth_low_energy/CHANGELOG.md @@ -1,3 +1,8 @@ +## 2.0.3 + +- `Android` Migrate to Android 13. +- `Android` Fix the issuce that receive wrong values caused by unsafe memory, see https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback#onCharacteristicChanged(android.bluetooth.BluetoothGatt,%20android.bluetooth.BluetoothGattCharacteristic) + ## 2.0.2 - Combine iOS and macOS projects. diff --git a/bluetooth_low_energy/example/pubspec.lock b/bluetooth_low_energy/example/pubspec.lock index 2ec3966..b603525 100644 --- a/bluetooth_low_energy/example/pubspec.lock +++ b/bluetooth_low_energy/example/pubspec.lock @@ -23,47 +23,47 @@ packages: path: ".." relative: true source: path - version: "2.0.2" + version: "2.0.3" bluetooth_low_energy_android: dependency: transitive description: name: bluetooth_low_energy_android - sha256: "99cf2d82ea788f9f927513827f33b501a866902bbbdc20031b856fab7bcda61b" + sha256: e740179e5143c74e2f308c78d395d49054c941b95eb776884d52192b80ccfcee url: "https://pub.dev" source: hosted - version: "2.0.2" + version: "2.0.3" bluetooth_low_energy_darwin: dependency: transitive description: name: bluetooth_low_energy_darwin - sha256: b81cc04e04ad44063a05072ddc748e036a3f269a90af4c86b132689e66df404f + sha256: "49e9dc08281fb25f91472252dfbdf7d1d6d94983bf2e746382ad4b2dd8ba05fe" url: "https://pub.dev" source: hosted - version: "2.0.2" + version: "2.0.3" bluetooth_low_energy_linux: dependency: transitive description: name: bluetooth_low_energy_linux - sha256: "11fc6a5f4c3d9121d2ac9b213a2f587dad2b091b7bfea648a709f0d70a909ca3" + sha256: d9576d89471e31b76cb2495dbb72aabaadc3aa093ad607f5aedb15518d5c20cb url: "https://pub.dev" source: hosted - version: "2.0.2" + version: "2.0.3" bluetooth_low_energy_platform_interface: dependency: transitive description: name: bluetooth_low_energy_platform_interface - sha256: "05ea2e4a802555065bda342099efec006b4d02c51806ee913fb82da90b5da60a" + sha256: dbc05f604e379ea7570db718a9ae7cf7fa08a20ee088a6f66de17b4acc7d9260 url: "https://pub.dev" source: hosted - version: "2.0.2" + version: "2.0.3" bluetooth_low_energy_windows: dependency: transitive description: name: bluetooth_low_energy_windows - sha256: "404c704b88e516f23b5cd9bc3873f65593e868b8c6398292146ccda6e48fd335" + sha256: c4d11b2769da214b5ea20f50980c00f3c3229450e46f9d075cd64298e5a27057 url: "https://pub.dev" source: hosted - version: "2.0.2" + version: "2.0.3" bluez: dependency: transitive description: diff --git a/bluetooth_low_energy/pubspec.yaml b/bluetooth_low_energy/pubspec.yaml index a049876..6cab240 100644 --- a/bluetooth_low_energy/pubspec.yaml +++ b/bluetooth_low_energy/pubspec.yaml @@ -1,6 +1,6 @@ name: bluetooth_low_energy description: A Flutter plugin for controlling the bluetooth low energy. -version: 2.0.2 +version: 2.0.3 homepage: https://github.com/yanshouwang/bluetooth_low_energy environment: @@ -10,11 +10,11 @@ environment: dependencies: flutter: sdk: flutter - bluetooth_low_energy_platform_interface: ^2.0.2 - bluetooth_low_energy_android: ^2.0.2 - bluetooth_low_energy_darwin: ^2.0.2 - bluetooth_low_energy_linux: ^2.0.2 - bluetooth_low_energy_windows: ^2.0.2 + bluetooth_low_energy_platform_interface: ^2.0.3 + bluetooth_low_energy_android: ^2.0.3 + bluetooth_low_energy_darwin: ^2.0.3 + bluetooth_low_energy_linux: ^2.0.3 + bluetooth_low_energy_windows: ^2.0.3 dev_dependencies: flutter_test: diff --git a/bluetooth_low_energy_android/CHANGELOG.md b/bluetooth_low_energy_android/CHANGELOG.md index dac61dd..cd9ca34 100644 --- a/bluetooth_low_energy_android/CHANGELOG.md +++ b/bluetooth_low_energy_android/CHANGELOG.md @@ -1,3 +1,8 @@ +## 2.0.3 + +- `Android` Migrate to Android 13. +- `Android` Fix the issuce that receive wrong values caused by unsafe memory, see https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback#onCharacteristicChanged(android.bluetooth.BluetoothGatt,%20android.bluetooth.BluetoothGattCharacteristic) + ## 2.0.2 - Combine iOS and macOS projects. diff --git a/bluetooth_low_energy_android/android/build.gradle b/bluetooth_low_energy_android/android/build.gradle index e8eb4df..3f6b712 100644 --- a/bluetooth_low_energy_android/android/build.gradle +++ b/bluetooth_low_energy_android/android/build.gradle @@ -29,7 +29,7 @@ android { namespace 'dev.yanshouwang.bluetooth_low_energy_android' } - compileSdkVersion 31 + compileSdkVersion 33 compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 diff --git a/bluetooth_low_energy_android/android/src/main/kotlin/dev/yanshouwang/bluetooth_low_energy_android/MyBluetoothGattCallback.kt b/bluetooth_low_energy_android/android/src/main/kotlin/dev/yanshouwang/bluetooth_low_energy_android/MyBluetoothGattCallback.kt index 61194f6..b28e75f 100644 --- a/bluetooth_low_energy_android/android/src/main/kotlin/dev/yanshouwang/bluetooth_low_energy_android/MyBluetoothGattCallback.kt +++ b/bluetooth_low_energy_android/android/src/main/kotlin/dev/yanshouwang/bluetooth_low_energy_android/MyBluetoothGattCallback.kt @@ -4,6 +4,7 @@ import android.bluetooth.BluetoothGatt import android.bluetooth.BluetoothGattCallback import android.bluetooth.BluetoothGattCharacteristic import android.bluetooth.BluetoothGattDescriptor +import android.os.Build import java.util.concurrent.Executor class MyBluetoothGattCallback(private val myCentralController: MyCentralController, private val executor: Executor) : BluetoothGattCallback() { @@ -21,10 +22,22 @@ class MyBluetoothGattCallback(private val myCentralController: MyCentralControll } } + override fun onCharacteristicRead(gatt: BluetoothGatt, characteristic: BluetoothGattCharacteristic, value: ByteArray, status: Int) { + super.onCharacteristicRead(gatt, characteristic, value, status) + executor.execute { + myCentralController.onCharacteristicRead(characteristic, status, value) + } + } + + // TODO: remove this override when minSdkVersion >= 33 override fun onCharacteristicRead(gatt: BluetoothGatt, characteristic: BluetoothGattCharacteristic, status: Int) { super.onCharacteristicRead(gatt, characteristic, status) + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { + return + } + val value = characteristic.value executor.execute { - myCentralController.onCharacteristicRead(characteristic, status) + myCentralController.onCharacteristicRead(characteristic, status, value) } } @@ -35,16 +48,41 @@ class MyBluetoothGattCallback(private val myCentralController: MyCentralControll } } - override fun onCharacteristicChanged(gatt: BluetoothGatt, characteristic: BluetoothGattCharacteristic) { + override fun onCharacteristicChanged(gatt: BluetoothGatt, characteristic: BluetoothGattCharacteristic, value: ByteArray) { + super.onCharacteristicChanged(gatt, characteristic, value) executor.execute { - myCentralController.onCharacteristicChanged(characteristic) + myCentralController.onCharacteristicChanged(characteristic, value) } } + // TODO: remove this override when minSdkVersion >= 33 + override fun onCharacteristicChanged(gatt: BluetoothGatt, characteristic: BluetoothGattCharacteristic) { + super.onCharacteristicChanged(gatt, characteristic) + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { + return + } + val value = characteristic.value + executor.execute { + myCentralController.onCharacteristicChanged(characteristic, value) + } + } + + override fun onDescriptorRead(gatt: BluetoothGatt, descriptor: BluetoothGattDescriptor, status: Int, value: ByteArray) { + super.onDescriptorRead(gatt, descriptor, status, value) + executor.execute { + myCentralController.onDescriptorRead(descriptor, status, value) + } + } + + // TODO: remove this override when minSdkVersion >= 33 override fun onDescriptorRead(gatt: BluetoothGatt, descriptor: BluetoothGattDescriptor, status: Int) { super.onDescriptorRead(gatt, descriptor, status) + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { + return + } + val value = descriptor.value executor.execute { - myCentralController.onDescriptorRead(descriptor, status) + myCentralController.onDescriptorRead(descriptor, status, value) } } diff --git a/bluetooth_low_energy_android/android/src/main/kotlin/dev/yanshouwang/bluetooth_low_energy_android/MyCentralController.kt b/bluetooth_low_energy_android/android/src/main/kotlin/dev/yanshouwang/bluetooth_low_energy_android/MyCentralController.kt index b1ccbf7..c131bef 100644 --- a/bluetooth_low_energy_android/android/src/main/kotlin/dev/yanshouwang/bluetooth_low_energy_android/MyCentralController.kt +++ b/bluetooth_low_energy_android/android/src/main/kotlin/dev/yanshouwang/bluetooth_low_energy_android/MyCentralController.kt @@ -8,6 +8,7 @@ import android.bluetooth.BluetoothGattDescriptor import android.bluetooth.BluetoothGattService import android.bluetooth.BluetoothManager import android.bluetooth.BluetoothProfile +import android.bluetooth.BluetoothStatusCodes import android.bluetooth.le.ScanFilter import android.bluetooth.le.ScanResult import android.bluetooth.le.ScanSettings @@ -41,9 +42,9 @@ class MyCentralController(private val context: Context, binaryMessenger: BinaryM private val myApi = MyCentralControllerFlutterApi(binaryMessenger) private val myRequestPermissionResultListener = MyRequestPermissionResultListener(this) - private val myReceiver = MyBroadcastReceiver(this) + private val myBroadcastReceiver = MyBroadcastReceiver(this) private val myScanCallback = MyScanCallback(this) - private val myGattCallback = MyBluetoothGattCallback(this, executor) + private val myBluetoothGattCallback = MyBluetoothGattCallback(this, executor) private val cachedDevices = mutableMapOf() private val cachedGATTs = mutableMapOf() @@ -108,12 +109,12 @@ class MyCentralController(private val context: Context, binaryMessenger: BinaryM private fun register() { val filter = IntentFilter(BluetoothAdapter.ACTION_STATE_CHANGED) - context.registerReceiver(myReceiver, filter) + context.registerReceiver(myBroadcastReceiver, filter) registered = true } private fun unregister() { - context.unregisterReceiver(myReceiver) + context.unregisterReceiver(myBroadcastReceiver) registered = false } @@ -153,9 +154,9 @@ class MyCentralController(private val context: Context, binaryMessenger: BinaryM val autoConnect = false cachedGATTs[deviceKey] = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { val transport = BluetoothDevice.TRANSPORT_LE - device.connectGatt(context, autoConnect, myGattCallback, transport) + device.connectGatt(context, autoConnect, myBluetoothGattCallback, transport) } else { - device.connectGatt(context, autoConnect, myGattCallback) + device.connectGatt(context, autoConnect, myBluetoothGattCallback) } connectCallbacks[deviceKey] = callback } catch (e: Throwable) { @@ -252,9 +253,15 @@ class MyCentralController(private val context: Context, binaryMessenger: BinaryM } val myTypeArgs = myTypeNumber.toMyGattCharacteristicTypeArgs() val writeType = myTypeArgs.toType() - characteristic.value = value - characteristic.writeType = writeType - val writing = gatt.writeCharacteristic(characteristic) + val writing = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { + val writeCode = gatt.writeCharacteristic(characteristic, value, writeType) + writeCode == BluetoothStatusCodes.SUCCESS + } else { + // TODO: remove this when minSdkVersion >= 33 + characteristic.value = value + characteristic.writeType = writeType + gatt.writeCharacteristic(characteristic) + } if (!writing) { throw IllegalStateException() } @@ -289,8 +296,14 @@ class MyCentralController(private val context: Context, binaryMessenger: BinaryM } val value = if (state) BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE else BluetoothGattDescriptor.DISABLE_NOTIFICATION_VALUE - descriptor.value = value - val writing = gatt.writeDescriptor(descriptor) + val writing = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { + val writeCode = gatt.writeDescriptor(descriptor, value) + writeCode == BluetoothStatusCodes.SUCCESS + } else { + // TODO: remove this when minSdkVersion >= 33 + descriptor.value = value + gatt.writeDescriptor(descriptor) + } if (!writing) { throw IllegalStateException() } @@ -339,8 +352,14 @@ class MyCentralController(private val context: Context, binaryMessenger: BinaryM if (unfinishedCallback != null) { throw IllegalStateException() } - descriptor.value = value - val writing = gatt.writeDescriptor(descriptor) + val writing = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { + val writeCode = gatt.writeDescriptor(descriptor, value) + writeCode == BluetoothStatusCodes.SUCCESS + } else { + // TODO: remove this when minSdkVersion >= 33 + descriptor.value = value + gatt.writeDescriptor(descriptor) + } if (!writing) { throw IllegalStateException() } @@ -381,13 +400,8 @@ class MyCentralController(private val context: Context, binaryMessenger: BinaryM if (action != BluetoothAdapter.ACTION_STATE_CHANGED) { return } -// val previousState = intent.getIntExtra(BluetoothAdapter.EXTRA_PREVIOUS_STATE, BluetoothAdapter.STATE_OFF) val state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, BluetoothAdapter.STATE_OFF) -// val myPreviousStateArgs = previousState.toMyCentralStateArgs() val myStateArgs = state.toMyCentralStateArgs() -// if (myStateArgs == myPreviousStateArgs) { -// return -// } val myStateNumber = myStateArgs.raw.toLong() myApi.onStateChanged(myStateNumber) {} } @@ -509,11 +523,10 @@ class MyCentralController(private val context: Context, binaryMessenger: BinaryM } } - fun onCharacteristicRead(characteristic: BluetoothGattCharacteristic, status: Int) { + fun onCharacteristicRead(characteristic: BluetoothGattCharacteristic, status: Int, value: ByteArray) { val characteristicKey = characteristic.hashCode() val callback = readCharacteristicCallbacks.remove(characteristicKey) ?: return if (status == BluetoothGatt.GATT_SUCCESS) { - val value = characteristic.value callback(Result.success(value)) } else { val error = IllegalStateException("Read characteristic failed with status: $status.") @@ -532,18 +545,16 @@ class MyCentralController(private val context: Context, binaryMessenger: BinaryM } } - fun onCharacteristicChanged(characteristic: BluetoothGattCharacteristic) { + fun onCharacteristicChanged(characteristic: BluetoothGattCharacteristic, value: ByteArray) { val characteristicKey = characteristic.hashCode() val myCharacteristicKey = characteristicKey.toLong() - val value = characteristic.value myApi.onCharacteristicValueChanged(myCharacteristicKey, value) {} } - fun onDescriptorRead(descriptor: BluetoothGattDescriptor, status: Int) { + fun onDescriptorRead(descriptor: BluetoothGattDescriptor, status: Int, value: ByteArray) { val descriptorKey = descriptor.hashCode() val callback = readDescriptorCallbacks.remove(descriptorKey) ?: return if (status == BluetoothGatt.GATT_SUCCESS) { - val value = descriptor.value callback(Result.success(value)) } else { val error = IllegalStateException("Read descriptor failed with status: $status.") diff --git a/bluetooth_low_energy_android/android/src/main/kotlin/dev/yanshouwang/bluetooth_low_energy_android/MyScanCallback.kt b/bluetooth_low_energy_android/android/src/main/kotlin/dev/yanshouwang/bluetooth_low_energy_android/MyScanCallback.kt index 43f0ca2..e576746 100644 --- a/bluetooth_low_energy_android/android/src/main/kotlin/dev/yanshouwang/bluetooth_low_energy_android/MyScanCallback.kt +++ b/bluetooth_low_energy_android/android/src/main/kotlin/dev/yanshouwang/bluetooth_low_energy_android/MyScanCallback.kt @@ -5,10 +5,12 @@ import android.bluetooth.le.ScanResult class MyScanCallback(private val myCentralController: MyCentralController) : ScanCallback() { override fun onScanFailed(errorCode: Int) { + super.onScanFailed(errorCode) myCentralController.onScanFailed(errorCode) } override fun onScanResult(callbackType: Int, result: ScanResult) { + super.onScanResult(callbackType, result) myCentralController.onScanResult(result) } } \ No newline at end of file diff --git a/bluetooth_low_energy_android/pubspec.yaml b/bluetooth_low_energy_android/pubspec.yaml index 83f6f4e..9157961 100644 --- a/bluetooth_low_energy_android/pubspec.yaml +++ b/bluetooth_low_energy_android/pubspec.yaml @@ -1,6 +1,6 @@ name: bluetooth_low_energy_android description: Android implementation of the bluetooth_low_energy plugin. -version: 2.0.2 +version: 2.0.3 homepage: https://github.com/yanshouwang/bluetooth_low_energy environment: @@ -10,7 +10,7 @@ environment: dependencies: flutter: sdk: flutter - bluetooth_low_energy_platform_interface: ^2.0.2 + bluetooth_low_energy_platform_interface: ^2.0.3 dev_dependencies: flutter_test: diff --git a/bluetooth_low_energy_darwin/CHANGELOG.md b/bluetooth_low_energy_darwin/CHANGELOG.md index 8c3740f..209f745 100644 --- a/bluetooth_low_energy_darwin/CHANGELOG.md +++ b/bluetooth_low_energy_darwin/CHANGELOG.md @@ -1,3 +1,8 @@ +## 2.0.3 + +- `Android` Migrate to Android 13. +- `Android` Fix the issuce that receive wrong values caused by unsafe memory, see https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback#onCharacteristicChanged(android.bluetooth.BluetoothGatt,%20android.bluetooth.BluetoothGattCharacteristic) + ## 2.0.2 - Combine iOS and macOS projects. diff --git a/bluetooth_low_energy_darwin/pubspec.yaml b/bluetooth_low_energy_darwin/pubspec.yaml index 3f4f2a6..2593e59 100644 --- a/bluetooth_low_energy_darwin/pubspec.yaml +++ b/bluetooth_low_energy_darwin/pubspec.yaml @@ -1,6 +1,6 @@ name: bluetooth_low_energy_darwin description: iOS and macOS implementation of the bluetooth_low_energy plugin. -version: 2.0.2 +version: 2.0.3 homepage: https://github.com/yanshouwang/bluetooth_low_energy environment: @@ -10,7 +10,7 @@ environment: dependencies: flutter: sdk: flutter - bluetooth_low_energy_platform_interface: ^2.0.2 + bluetooth_low_energy_platform_interface: ^2.0.3 dev_dependencies: flutter_test: diff --git a/bluetooth_low_energy_linux/CHANGELOG.md b/bluetooth_low_energy_linux/CHANGELOG.md index dac61dd..cd9ca34 100644 --- a/bluetooth_low_energy_linux/CHANGELOG.md +++ b/bluetooth_low_energy_linux/CHANGELOG.md @@ -1,3 +1,8 @@ +## 2.0.3 + +- `Android` Migrate to Android 13. +- `Android` Fix the issuce that receive wrong values caused by unsafe memory, see https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback#onCharacteristicChanged(android.bluetooth.BluetoothGatt,%20android.bluetooth.BluetoothGattCharacteristic) + ## 2.0.2 - Combine iOS and macOS projects. diff --git a/bluetooth_low_energy_linux/pubspec.yaml b/bluetooth_low_energy_linux/pubspec.yaml index 17e7fdf..19f048e 100644 --- a/bluetooth_low_energy_linux/pubspec.yaml +++ b/bluetooth_low_energy_linux/pubspec.yaml @@ -1,6 +1,6 @@ name: bluetooth_low_energy_linux description: Linux implementation of the bluetooth_low_energy plugin. -version: 2.0.2 +version: 2.0.3 homepage: https://github.com/yanshouwang/bluetooth_low_energy environment: @@ -10,7 +10,7 @@ environment: dependencies: flutter: sdk: flutter - bluetooth_low_energy_platform_interface: ^2.0.2 + bluetooth_low_energy_platform_interface: ^2.0.3 bluez: ^0.8.1 dev_dependencies: diff --git a/bluetooth_low_energy_platform_interface/CHANGELOG.md b/bluetooth_low_energy_platform_interface/CHANGELOG.md index dac61dd..cd9ca34 100644 --- a/bluetooth_low_energy_platform_interface/CHANGELOG.md +++ b/bluetooth_low_energy_platform_interface/CHANGELOG.md @@ -1,3 +1,8 @@ +## 2.0.3 + +- `Android` Migrate to Android 13. +- `Android` Fix the issuce that receive wrong values caused by unsafe memory, see https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback#onCharacteristicChanged(android.bluetooth.BluetoothGatt,%20android.bluetooth.BluetoothGattCharacteristic) + ## 2.0.2 - Combine iOS and macOS projects. diff --git a/bluetooth_low_energy_platform_interface/pubspec.yaml b/bluetooth_low_energy_platform_interface/pubspec.yaml index d26a4b1..09c37ee 100644 --- a/bluetooth_low_energy_platform_interface/pubspec.yaml +++ b/bluetooth_low_energy_platform_interface/pubspec.yaml @@ -1,6 +1,6 @@ name: bluetooth_low_energy_platform_interface description: A common platform interface for the bluetooth_low_energy plugin. -version: 2.0.2 +version: 2.0.3 homepage: https://github.com/yanshouwang/bluetooth_low_energy environment: diff --git a/bluetooth_low_energy_windows/CHANGELOG.md b/bluetooth_low_energy_windows/CHANGELOG.md index dac61dd..cd9ca34 100644 --- a/bluetooth_low_energy_windows/CHANGELOG.md +++ b/bluetooth_low_energy_windows/CHANGELOG.md @@ -1,3 +1,8 @@ +## 2.0.3 + +- `Android` Migrate to Android 13. +- `Android` Fix the issuce that receive wrong values caused by unsafe memory, see https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback#onCharacteristicChanged(android.bluetooth.BluetoothGatt,%20android.bluetooth.BluetoothGattCharacteristic) + ## 2.0.2 - Combine iOS and macOS projects. diff --git a/bluetooth_low_energy_windows/pubspec.yaml b/bluetooth_low_energy_windows/pubspec.yaml index 3efc16e..ba3bb67 100644 --- a/bluetooth_low_energy_windows/pubspec.yaml +++ b/bluetooth_low_energy_windows/pubspec.yaml @@ -1,6 +1,6 @@ name: bluetooth_low_energy_windows description: Windows implementation of the bluetooth_low_energy plugin. -version: 2.0.2 +version: 2.0.3 homepage: https://github.com/yanshouwang/bluetooth_low_energy environment: @@ -10,7 +10,7 @@ environment: dependencies: flutter: sdk: flutter - bluetooth_low_energy_platform_interface: ^2.0.2 + bluetooth_low_energy_platform_interface: ^2.0.3 win32: ^5.0.6 dev_dependencies: