diff --git a/packages/android_alarm_manager_plus/CHANGELOG.md b/packages/android_alarm_manager_plus/CHANGELOG.md index 62b5336b73..f3415dda42 100644 --- a/packages/android_alarm_manager_plus/CHANGELOG.md +++ b/packages/android_alarm_manager_plus/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.3.2 + +- Fix build issue introduced in 1.3.1. + ## 1.3.1 - Fix `PendingIntent`s for Android 12+ diff --git a/packages/android_alarm_manager_plus/android/src/main/java/dev/fluttercommunity/plus/androidalarmmanager/AlarmService.java b/packages/android_alarm_manager_plus/android/src/main/java/dev/fluttercommunity/plus/androidalarmmanager/AlarmService.java index 3086300965..676b5c9a60 100644 --- a/packages/android_alarm_manager_plus/android/src/main/java/dev/fluttercommunity/plus/androidalarmmanager/AlarmService.java +++ b/packages/android_alarm_manager_plus/android/src/main/java/dev/fluttercommunity/plus/androidalarmmanager/AlarmService.java @@ -9,6 +9,7 @@ import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; +import android.os.Build; import android.os.Handler; import android.util.Log; import androidx.core.app.AlarmManagerCompat; @@ -136,7 +137,7 @@ private static void scheduleAlarm( context, requestCode, alarm, - (Build.VERSION >= 23 ? PendingIntent.FLAG_IMMUTABLE : 0) + (Build.VERSION.SDK_INT >= 23 ? PendingIntent.FLAG_IMMUTABLE : 0) | PendingIntent.FLAG_UPDATE_CURRENT); // Use the appropriate clock. @@ -225,7 +226,7 @@ public static void cancel(Context context, int requestCode) { context, requestCode, alarm, - (Build.VERSION >= 23 ? PendingIntent.FLAG_IMMUTABLE : 0) + (Build.VERSION.SDK_INT >= 23 ? PendingIntent.FLAG_IMMUTABLE : 0) | PendingIntent.FLAG_NO_CREATE); if (existingIntent == null) { Log.i(TAG, "cancel: broadcast receiver not found"); diff --git a/packages/android_alarm_manager_plus/pubspec.yaml b/packages/android_alarm_manager_plus/pubspec.yaml index 33922d7db2..080468fae5 100644 --- a/packages/android_alarm_manager_plus/pubspec.yaml +++ b/packages/android_alarm_manager_plus/pubspec.yaml @@ -1,7 +1,7 @@ name: android_alarm_manager_plus description: Flutter plugin for accessing the Android AlarmManager service, and running Dart code in the background when alarms fire. -version: 1.3.1 +version: 1.3.2 homepage: https://plus.fluttercommunity.dev/ repository: https://github.com/fluttercommunity/plus_plugins/tree/main/packages/