Skip to content

Commit 03e83ae

Browse files
committed
release: 9.0.0
1 parent 5eedd38 commit 03e83ae

File tree

4 files changed

+82
-2
lines changed

4 files changed

+82
-2
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
## 9.0.0
2+
3+
* [**CHORE**] Bump minimum supported SDK version to `Flutter 3.22/Dart 3.4`
4+
* [**CHORE**] Bump `kotlin_version(1.7.10 -> 1.9.10)`, `gradle(7.3.0 -> 8.6.0)` for Android 15
5+
* [**FEAT**] Add `isTimeout` param to the onDestroy callback
6+
* [**FIX**] Fix "null object" error [#332](https://github.com/Dev-hwang/flutter_foreground_task/issues/332)
7+
* [**FIX**] Fix "Reply already submitted" error [#330](https://github.com/Dev-hwang/flutter_foreground_task/issues/330)
8+
* [**FIX**] Prevent crash by catching exceptions during foreground service start
9+
* Check [migration_documentation](./documentation/migration_documentation.md) for changes
10+
111
## 8.17.0
212

313
* [**FEAT**] Allow `onNotificationPressed` to trigger without `SYSTEM_ALERT_WINDOW` permission

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,20 @@ To use this plugin, add `flutter_foreground_task` as a [dependency in your pubsp
2727

2828
```yaml
2929
dependencies:
30-
flutter_foreground_task: ^8.17.0
30+
flutter_foreground_task: ^9.0.0
3131
```
3232
3333
After adding the plugin to your flutter project, we need to declare the platform-specific permissions ans service to use for this plugin to work properly.
3434
3535
### :baby_chick: Android
3636
37+
This plugin requires `Kotlin version 1.9.10+` and `Gradle version 8.6.0+`. Please refer to the migration documentation for more details.
38+
39+
- [project/settings.gradle](https://github.com/Dev-hwang/flutter_foreground_task/blob/master/example/android/settings.gradle)
40+
- [project/gradle-wrapper.properties](https://github.com/Dev-hwang/flutter_foreground_task/blob/master/example/android/gradle/wrapper/gradle-wrapper.properties)
41+
- [app/build.gradle](https://github.com/Dev-hwang/flutter_foreground_task/blob/master/example/android/app/build.gradle)
42+
- [migration_documentation](https://github.com/Dev-hwang/flutter_foreground_task/blob/master/documentation/migration_documentation.md)
43+
3744
Open the `AndroidManifest.xml` file and declare the service tag inside the `<application>` tag as follows.
3845

3946
If you want the foreground service to run only when the app is running, add `android:stopWithTask="true"`.

documentation/migration_documentation.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,68 @@
11
## Migration
22

3+
### ver 9.0.0
4+
5+
- chore: Bump minimum supported SDK version to `Flutter 3.22/Dart 3.4`.
6+
7+
```
8+
environment:
9+
// sdk: ">=3.0.0 <4.0.0"
10+
// flutter: ">=3.10.0"
11+
sdk: ^3.4.0
12+
flutter: ">=3.22.0"
13+
```
14+
15+
- chore: Bump `kotlin_version(1.7.10 -> 1.9.10)`, `gradle(7.3.0 -> 8.6.0)` for Android 15.
16+
17+
```
18+
[android/settings.gradle]
19+
plugins {
20+
// id "com.android.application" version "7.3.0" apply false
21+
// id "org.jetbrains.kotlin.android" version "1.7.10" apply false
22+
id "com.android.application" version "8.6.0" apply false
23+
id "org.jetbrains.kotlin.android" version "1.9.10" apply false
24+
}
25+
26+
[android/gradle/wrapper/gradle-wrapper.properties]
27+
// distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip
28+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
29+
30+
[android/app/build.gradle]
31+
android {
32+
// compileSdk 34
33+
compileSdk 35
34+
35+
compileOptions {
36+
// sourceCompatibility JavaVersion.VERSION_1_8
37+
// targetCompatibility JavaVersion.VERSION_1_8
38+
sourceCompatibility JavaVersion.VERSION_11
39+
targetCompatibility JavaVersion.VERSION_11
40+
}
41+
42+
kotlinOptions {
43+
// jvmTarget = JavaVersion.VERSION_1_8
44+
jvmTarget = JavaVersion.VERSION_11
45+
}
46+
47+
defaultConfig {
48+
// targetSdkVersion 34
49+
targetSdkVersion 35
50+
}
51+
}
52+
```
53+
54+
- feat: Add `isTimeout` param to the onDestroy callback.
55+
56+
```dart
57+
// from
58+
@override
59+
Future<void> onDestroy(DateTime timestamp) async {}
60+
61+
// to
62+
@override
63+
Future<void> onDestroy(DateTime timestamp, bool isTimeout) async {}
64+
```
65+
366
### ver 8.16.0
467

568
- Change `ServiceRequestResult` class to `sealed class` for improved code readability.

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: flutter_foreground_task
22
description: This plugin is used to implement a foreground service on the Android platform.
3-
version: 8.17.0
3+
version: 9.0.0
44
homepage: https://github.com/Dev-hwang/flutter_foreground_task
55

66
environment:

0 commit comments

Comments
 (0)