diff --git a/CHANGELOG.md b/CHANGELOG.md
index babb80d..5cabfd8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+## 5.1.0
+* [Android] Fixed an issue which caused the callback to fail.
+* [Android] Upgraded Nordic DFU Library to version 2.2.0
+* [iOS] Upgraded Nordic DFU POD to version 4.13.0
+
## 5.0.1
* [Android] Upgraded Nordic DFU Library to version 2.0.3
* Upgraded some dependencies
diff --git a/android/build.gradle b/android/build.gradle
index 6166b6d..3dae441 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -25,7 +25,7 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
android {
- compileSdkVersion 32
+ compileSdkVersion 33
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
diff --git a/android/src/main/kotlin/dev/steenbakker/nordicdfu/NordicDfuPlugin.kt b/android/src/main/kotlin/dev/steenbakker/nordicdfu/NordicDfuPlugin.kt
index ade8561..9d0d5cd 100644
--- a/android/src/main/kotlin/dev/steenbakker/nordicdfu/NordicDfuPlugin.kt
+++ b/android/src/main/kotlin/dev/steenbakker/nordicdfu/NordicDfuPlugin.kt
@@ -55,7 +55,10 @@ class NordicDfuPlugin : FlutterPlugin, MethodCallHandler, EventChannel.StreamHa
}
override fun onListen(arguments: Any?, events: EventChannel.EventSink?) {
- DfuServiceListenerHelper.registerProgressListener(binding.applicationContext, mDfuProgressListener)
+ if (mContext != null) {
+ DfuServiceListenerHelper.registerProgressListener(mContext!!, mDfuProgressListener)
+ }
+
this.sink = events
}
diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle
index 8a60518..bd97dc7 100644
--- a/example/android/app/build.gradle
+++ b/example/android/app/build.gradle
@@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
- compileSdkVersion 32
+ compileSdkVersion 33
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
@@ -40,7 +40,7 @@ android {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "dev.steenbakker.nordicdfuexample"
minSdkVersion 19
- targetSdkVersion 32
+ targetSdkVersion 33
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
diff --git a/example/android/build.gradle b/example/android/build.gradle
index 61afb9d..e50c3a0 100644
--- a/example/android/build.gradle
+++ b/example/android/build.gradle
@@ -1,12 +1,12 @@
buildscript {
- ext.kotlin_version = '1.6.21'
+ ext.kotlin_version = '1.7.10'
repositories {
google()
mavenCentral()
}
dependencies {
- classpath 'com.android.tools.build:gradle:7.1.3'
+ classpath 'com.android.tools.build:gradle:7.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties
index 3fdd79b..17e0bd9 100644
--- a/example/android/gradle/wrapper/gradle-wrapper.properties
+++ b/example/android/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Thu Apr 07 10:20:39 CEST 2022
+#Thu Sep 22 15:20:20 CEST 2022
distributionBase=GRADLE_USER_HOME
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
diff --git a/example/ios/Flutter/AppFrameworkInfo.plist b/example/ios/Flutter/AppFrameworkInfo.plist
index 8d4492f..9625e10 100644
--- a/example/ios/Flutter/AppFrameworkInfo.plist
+++ b/example/ios/Flutter/AppFrameworkInfo.plist
@@ -21,6 +21,6 @@
CFBundleVersion
1.0
MinimumOSVersion
- 9.0
+ 11.0
diff --git a/example/ios/Podfile b/example/ios/Podfile
index 252d9ec..313ea4a 100644
--- a/example/ios/Podfile
+++ b/example/ios/Podfile
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
-platform :ios, '9.0'
+platform :ios, '11.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj
index 1e4a94a..604ea5d 100644
--- a/example/ios/Runner.xcodeproj/project.pbxproj
+++ b/example/ios/Runner.xcodeproj/project.pbxproj
@@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
- objectVersion = 46;
+ objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
@@ -358,7 +358,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
@@ -379,7 +379,7 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
@@ -437,7 +437,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@@ -484,7 +484,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
@@ -507,7 +507,7 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
@@ -537,7 +537,7 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
diff --git a/example/ios/Runner/Info.plist b/example/ios/Runner/Info.plist
index a36fd16..4c6c220 100644
--- a/example/ios/Runner/Info.plist
+++ b/example/ios/Runner/Info.plist
@@ -45,5 +45,7 @@
NSBluetoothPeripheralUsageDescription
Play with BLE Compatible devices
+ CADisableMinimumFrameDurationOnPhone
+
diff --git a/example/pubspec.yaml b/example/pubspec.yaml
index 8ef35de..ab7db2e 100644
--- a/example/pubspec.yaml
+++ b/example/pubspec.yaml
@@ -6,18 +6,18 @@ environment:
sdk: '>=2.12.0 <3.0.0'
dependencies:
- collection: ^1.15.0
+ collection: ^1.16.0
flutter:
sdk: flutter
- flutter_blue_plus: ^1.1.2
+ flutter_blue_plus: ^1.3.1
nordic_dfu:
path: ../
- permission_handler: ^9.2.0
+ permission_handler: ^10.0.1
dev_dependencies:
flutter_test:
sdk: flutter
- lint: ^1.8.2
+ lint: ^1.10.0
flutter:
uses-material-design: true
diff --git a/ios/nordic_dfu.podspec b/ios/nordic_dfu.podspec
index b6b9a39..b68db94 100644
--- a/ios/nordic_dfu.podspec
+++ b/ios/nordic_dfu.podspec
@@ -16,7 +16,7 @@ A new flutter plugin project.
s.public_header_files = 'Classes/**/*.h'
s.swift_version = '5.4'
s.dependency 'Flutter'
- s.dependency 'iOSDFULibrary', '~> 4.11.1'
+ s.dependency 'iOSDFULibrary', '~> 4.13.0'
s.ios.deployment_target = '9.0'
end
diff --git a/pubspec.yaml b/pubspec.yaml
index 68b11e5..dc64390 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,6 +1,6 @@
name: nordic_dfu
description: This library allows you to do a Device Firmware Update (DFU) of your nrf51 or nrf52 chip from Nordic Semiconductor. Fork of flutter-nordic-dfu.
-version: 5.0.1
+version: 5.1.0
homepage: https://github.com/juliansteenbakker/nordic_dfu
environment:
@@ -12,7 +12,7 @@ dependencies:
sdk: flutter
dev_dependencies:
- lint: ^1.8.2
+ lint: ^1.10.0
flutter:
plugin: