Skip to content

Commit

Permalink
Release 2.2.5 (#476)
Browse files Browse the repository at this point in the history
* Fix capitalization style for UUID and constant names (#437)

* Fix capitalization of UUID in Service

* Fix capitalization of UUID in ScanResult

* Fix capitalization of UUID in Peripheral

* Rename bytes to value

* Fix capitalization of UUID in metadata strings in ScanResult

* Fix constants capitalization in BleError

* Revert "Fix capitalization of UUID in metadata strings in ScanResult"

This reverts commit 08516ec.

* Fix capitalization of UUID in managers for classes

* Fix capitalization of UUID for InternalBleManager

* Fix capitalization of UUID in CharacteristicsMixin

* Fix capitalization of UUID in DevicesMixin

* Rename bytes to value in internal classes

* Add unit tests for Service (#439)

* unit test for BleManager

* [descriptor] override equals & hashcode functions

* [tests] add: mock classes for managers

* [service] add: service tests

* [tests] create characteristics and descriptors using separate generators

* [service][tests] cover generating transactionId when it's not specified

* [service][tests] clear mocks interactions after each test

* [service][tests] add missing test for getting all descriptors for specified characteristic

Co-authored-by: Paweł Byszewski <[email protected]>

* Descriptor unit tests (#441)

* unit test for BleManager

* [descriptor] override equals & hashcode functions

* [tests] add: mock classes for managers

* [tests] create characteristics and descriptors using separate generators

* [descriptor] add: tests

* [descriptor] fix: test names

* [tests] move all mocks declarations to one aggregate file

* [ble-manager][test] add matcher to always check objects' references

* [descriptor][test] add tests that check uniquity of transactionId

Co-authored-by: pawelByszewski <[email protected]>

* [iOS] Fixed casting of Bool arguments received from dart (#451)

* Remove root level `Flutter User Facing API.dart` (#455) 

* rename root level file

naming interfered with certain build_runner code generators

* remove flutter_user_facing_api.dart

* Handle destroyClient call on iOS (#461)

* Handle destroyClient call on iOS

* Add missing semicolon

* [Android] Fix race condition in ConnectionStateStreamHanderl (#468) (#469)

* [Android] Fix race condition in ConnectionStateStreamHanderl (#468)

Add extra null check and synchronized block in async callback

* [Android] Move json generation back into try catch block (#468)

* Update pubspec format (#418)

* Remove author field

* Add supported platforms

* Enforce Flutter version

* Release 2.2.5

Co-authored-by: Łukasz Rejman <[email protected]>
Co-authored-by: Bartosz Wilk <[email protected]>
Co-authored-by: Paweł Byszewski <[email protected]>
Co-authored-by: pawelByszewski <[email protected]>
Co-authored-by: Tomasz Bogusz <[email protected]>
Co-authored-by: Dustin Graham <[email protected]>
Co-authored-by: Leo Huang <[email protected]>
  • Loading branch information
8 people authored Jun 10, 2020
1 parent 7d55135 commit e0b4415
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 12 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 2.2.5

* add missing handling of destroyClient call on iOS
* fix race condition in ConnectionStateStreamHandler (thanks, @cbreezier!)
* fix issue with picking incorrect characteristic on Android when there are multiple characteristics with the same UUID on the peripheral
* update pubspec format to properly display supported platforms
* fix messages in IllegalStateExceptions on Android

## 2.2.4

* Fix issue where `withResponse` argument was always true when writing to a characteristic on iOS
Expand Down
4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group 'com.polidea.flutter_ble_lib'
version '2.2.4'
version '2.2.5'

buildscript {
repositories {
Expand Down Expand Up @@ -36,5 +36,5 @@ android {

dependencies {
implementation 'androidx.annotation:annotation:1.1.0'
implementation 'com.github.Polidea:MultiPlatformBleAdapter:0.1.5'
implementation 'com.github.Polidea:MultiPlatformBleAdapter:0.1.6'
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,20 @@ synchronized public void onCancel(Object o) {

synchronized public void onNewConnectionState(final ConnectionStateChange connectionState) {
if (eventSink != null) {
final ConnectionStateStreamHandler that = this;
new Handler(Looper.getMainLooper()).post(new Runnable() {
@Override
public void run() {
try {
eventSink.success(connectionStateChangeJsonConverter.toJson(connectionState));
} catch (JSONException e) {
eventSink.error("-1", e.getMessage(), e.getStackTrace());
synchronized (that) {
// Check again for null - by the time we get into this async runnable our eventSink
// may have been canceled
if (eventSink != null) {
try {
eventSink.success(connectionStateChangeJsonConverter.toJson(connectionState));
} catch (JSONException e) {
eventSink.error("-1", e.getMessage(), e.getStackTrace());
}
}
}
}
});
Expand Down
2 changes: 2 additions & 0 deletions ios/Classes/FlutterBleLibPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ + (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar> *)registrar {
- (void)handleMethodCall:(FlutterMethodCall *)call result:(FlutterResult)result {
if ([METHOD_NAME_CREATE_CLIENT isEqualToString:call.method]) {
[self createClient:call result:result];
} else if ([METHOD_NAME_DESTROY_CLIENT isEqualToString:call.method]) {
[self destroyClient];
} else if ([METHOD_NAME_ENABLE_RADIO isEqualToString:call.method]) {
[self enable:call result:result];
} else if ([METHOD_NAME_DISABLE_RADIO isEqualToString:call.method]) {
Expand Down
4 changes: 2 additions & 2 deletions ios/flutter_ble_lib.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
Pod::Spec.new do |s|
s.name = 'flutter_ble_lib'
s.version = '2.2.4'
s.version = '2.2.5'
s.summary = 'A new flutter plugin project.'
s.description = <<-DESC
A new flutter plugin project.
Expand All @@ -16,7 +16,7 @@ A new flutter plugin project.
s.public_header_files = 'Classes/**/*.h'
s.dependency 'Flutter'
s.swift_versions = ['4.0', '4.2', '5.0']
s.dependency 'MultiplatformBleAdapter', '~> 0.1.5'
s.dependency 'MultiplatformBleAdapter', '~> 0.1.6'

s.ios.deployment_target = '8.0'
end
Expand Down
13 changes: 9 additions & 4 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: flutter_ble_lib
description: FlutterBle Library is a flutter library that supports BLE operations. It uses MultiPlatformBleAdapter as a native backend..
version: 2.2.4
author: "Polidea <[email protected]>"
version: 2.2.5
homepage: https://github.com/Polidea/FlutterBleLib

environment:
sdk: ">=2.1.0 <3.0.0"
# Flutter versions prior to 1.10 did not support the flutter.plugin.platforms map.
flutter: ">=1.10.0 <2.0.0"

dependencies:
collection: ^1.14.11
Expand All @@ -30,8 +31,12 @@ flutter:
# be modified. They are used by the tooling to maintain consistency when
# adding or updating assets for this project.
plugin:
androidPackage: com.polidea.flutter_ble_lib
pluginClass: FlutterBleLibPlugin
platforms:
android:
package: com.polidea.flutter_ble_lib
pluginClass: FlutterBleLibPlugin
ios:
pluginClass: FlutterBleLibPlugin
# To add assets to your plugin package, add an assets section, like this:
# assets:
# - images/a_dot_burr.jpeg
Expand Down

0 comments on commit e0b4415

Please sign in to comment.