flutter_local_notifications

A Flutter plugin for displaying local notifications on Android, iOS, macOS and Linux

Stars
2.4K
Committers
119

Bot releases are hidden (Show)

flutter_local_notifications - flutter_local_notifications-v14.0.0+1

Published by MaikuB over 1 year ago

  • Updated cavaet on scheduling Android notifications where a link to https://dontkillmyapp.com has been added as it contains instructions on how to configure various devices to bypass the battery optimisations that prevent background processes from working e.g. scheduled notifications
  • Added missing note to the 14.0.0 release notes on a breaking change the AndroidFlutterLocalNotificationsPlugin APIs around scheduling notifications where the allowWhileIdle has been removed and replaced by a scheduleMode parameter that allows for scheduling inexact notifications
  • Updated docs to explain that if a notification was scheduled on Android with exact timing via the AndroidScheduleMode enum but the exact alarm permissions had been revoked, an error log message will be written and notification will no longer be scheduled. This means recurring notifications would no longer be scheduled as well given the permission had been revoked
flutter_local_notifications - flutter_local_notifications-v14.0.0

Published by MaikuB over 1 year ago

  • Breaking change the id property of the ActiveNotification class is now nullable to help indicate that the notification may not have been created by the plugin e.g. it was from Firebase Cloud Messaging. Thanks to the PR from frankvollebregt
  • Breaking change the following classes are now enums
    • AndroidNotificationCategory
    • AndroidServiceForegroundType
    • AndroidServiceStartType
    • AudioAttributesUsage
    • Day
    • InterruptionLevel
    • LinuxNotificationCategory
    • LinuxNotificationUrgency
    • Priority
  • [Android] added support for scheduling inexact notifications. The corresponding APIs for scheduling notifications now have a new AndroidScheduleMode to allow for configuring this if required. The androidAllowWhileIdle argument is now deprecated when using the APIs available for scheduling notifications via the FlutterLocalNotificationsPlugin APIs and will be removed in the future. Thanks to the PR from Joachim Böhmer. Note that if if a notification was scheduled with exact timing via the AndroidScheduleMode but the exact alarm permissions had been revoked, an error log message will be written and notification will no longer be scheduled. Do note that the androidScheduleMode parameter has a default value of AndroidScheduleMode.exact to align with what was the default value of androidAllowWhileIdle before (i.e. false) where that meant exact timing was to be used but the device being a low-powered idle may cause it to be delayed. When the androidAllowWhileIdle parameter is removed in the future, androidScheduleMode will become a required named parameter to ensure developers explicitly specify the value they want
    • [Android] Breaking change related to this is whilst androidAllowWhileIdle is deprecated via the FlutterLocalNotificationsPlugin APIs, allowWhileIdle has been removed and completely replaced by a scheduleMode parameter when whe directly using the AndroidFlutterLocalNotificationsPlugin APIs
  • [Android] adds a namespace for compatibility with AGP (Android Gradle plugin) 8.0. Thanks to the PR from asaarnak
  • [iOS][macOS] fixed issue 1950 where plugin would crash when calling zonedSchedule() with a date/time value that is exactly when daylight savings occurs and the APIs from Apple weren't able to resolve what the actual date/time is meant to be
  • [Android] updated AndroidServiceForegroundType values to align with new additions that are part of Android 14. Thanks to the PR from Rexios
  • [macOS] fixed issue 1858 where macOS app builds were showing deprecation warnings. Thanks to the PR from Steve Kohls
  • Bumped mockito dev dependency
  • Align Dart SDK constraint with minimum Flutter version (i.e. 3.0)
  • Fixed readme that was reference old classes with IOS as part of the name instead of the newer classes that have the Darwin prefix
  • Removed dead link that had archived official documentation around guidance on creating the appropriate Android icons that would help with creating notification icons. Now replaced with a link to using Image Asset Studio to create notification icons
flutter_local_notifications - flutter_local_notifications-v14.0.0-dev.5

Published by MaikuB over 1 year ago

  • [macOS] fixed issue 1858 where macOS app builds were showing deprecation warnings. Thanks to the PR from Steve Kohls
flutter_local_notifications - flutter_local_notifications-v14.0.0-dev.4

Published by MaikuB over 1 year ago

  • Breaking change the following classes are now enums
    • AndroidNotificationCategory
    • AndroidServiceForegroundType
    • AndroidServiceStartType
    • AudioAttributesUsage
    • Day
    • InterruptionLevel
    • LinuxNotificationCategory
    • LinuxNotificationUrgency
    • Priority
  • [iOS][macOS] fixed issue 1950 where plugin would crash when calling zonedSchedule() with a date/time value that is exactly when daylight savings occurs and the APIs from Apple weren't able to resolve what the actual date/time is meant to be
  • [Android] updated AndroidServiceForegroundType values to align with new additions that are part of Android 14. Thanks to the PR from Rexios
  • Aligned Dart SDK constraint with minimum Flutter version (i.e. 3.0)
  • Bumped mockito dev dependency
flutter_local_notifications - flutter_local_notifications-v14.0.0-dev.2

Published by MaikuB over 1 year ago

  • Breaking change the id property of the ActiveNotification class is now nullable to help indicate that the notification may not have been created by the plugin e.g. it was from Firebase Cloud Messaging. Thanks to the PR from frankvollebregt
flutter_local_notifications - flutter_local_notifications-v14.0.0-dev.1

Published by MaikuB over 1 year ago

  • [Android] added support for scheduling inexact notifications. The corresponding APIs for scheduling notifications now have a new AndroidScheduleMode to allow for configuring this if required. The androidAllowWhileIdle argument is now deprecated and will be removed in the future. Thanks to the PR from Joachim Böhmer
  • Fixed readme that was reference old classes with IOS as part of the name instead of the newer classes that have the Darwin prefix
flutter_local_notifications - flutter_local_notifications-v13.0.0

Published by MaikuB almost 2 years ago

  • [Android] Bumped Android Gradle plugin to 7.3.1. Thanks to the PR from Rexios
    • Updated minimum Flutter version to 3.0.0. Note that technically this was already a requirement by flutter_local_notifications_linux 2.0.0 as ffi 2.0.0 requires Dart 2.17 at a minimum and that shipped with Flutter 3.0.0
  • Added explicit ffi dependency that Linux implementation of the plugin was already using
  • Updated site used by example app to display dummy/placeholder images
  • Updated readme to warn developers that choose not to follow the official Android guidance around notification icons that using the @mipmap/ic_launcher resource requires additional release build configuration. Thanks to the PR from Daniel Arndt
  • Updated readme to add note about how Flutter has an issue with apps running with desugaring on Android 12L and above. Thanks to the PR from Mirek Mazel See https://github.com/flutter/flutter/issues/110658. One potential fix added to the readme is for apps to add the WindowManager library as a dependency:
dependencies {
    implementation 'androidx.window:window:1.0.0'
    implementation 'androidx.window:window-java:1.0.0'
    ...
}
flutter_local_notifications - flutter_local_notifications-v12.0.4

Published by MaikuB almost 2 years ago

  • Fixed issue 1796 where a java.lang.ClassCastException may be thrown on some Android devices when the onDidReceiveBackgroundNotificationResponse has been specified when calling initialize()
flutter_local_notifications - flutter_local_notifications-v12.0.3+1

Published by MaikuB almost 2 years ago

  • Updated Kotlin version used in example app
  • Updated code snippets in readme to add missing import statements around the iOS setup related to notification actions. Thanks to PR from som-R91
flutter_local_notifications - flutter_local_notifications-v12.0.3

Published by MaikuB almost 2 years ago

  • [Android] removed reference to Android V1 embedding. Thanks to PR from Simon Ser
  • Updated code snippet in readme around requesting notification permissions on Android. Thanks to PR from Leo
flutter_local_notifications - flutter_local_notifications-v12.0.2

Published by MaikuB about 2 years ago

  • [Android] changed callback lookup for notification actions to take place after Flutter engine to ensure callback cache has been initialised to find the callback. This is a follow-up to changes done in 12.0.1 in trying to address issue 1721
  • [Android] updated plugin to clean up resources after it is detached from Flutter engine. Thanks to PR from Simon Ser
flutter_local_notifications - flutter_local_notifications-v12.0.1+1

Published by MaikuB about 2 years ago

  • Updated readme to indicate that the timezone package should be added as a direct dependency according to this official lint rule
  • Bumped dependency constraints on flutter_local_notification_linux that was meant to be done in 12.0.0
flutter_local_notifications - flutter_local_notifications-v12.0.1

Published by MaikuB about 2 years ago

  • [Android][iOS] fixed issue 1721 where a crash occurs upon tapping on a notification action fbut the onDidReceiveBackgroundNotificationResponse optional callback hasn't been specified.
  • [iOS] suppressed deprecation warnings where plugin was Apple's old notification APIs to support older iOS devices
flutter_local_notifications - flutter_local_notifications-v12.0.0

Published by MaikuB about 2 years ago

  • Bumped dbus dependency via flutter_local_notifications_linux
flutter_local_notifications - flutter_local_notifications-v11.0.1

Published by MaikuB about 2 years ago

  • [Android] fixed crash when using notification actions with a foreground service. Thanks to the PR from Arnold Laishram
  • [Android] Suppressed deprecation warning on calling the getParcelableExtra Intent API
  • Fixed typo in readme around Darwin (iOS/macOS) initialisation settings
  • Added a link to an issue with using Flutter apps with desugaring enabled where crashes could occur on foldable Android devices. Link to this is https://github.com/flutter/flutter/issues/110658 so those experience the problem can follow the issue and try out the solutions there as this isn't specific to the plugin
  • Replaced usage of rxDart in example app use StreamController instead to minimise use of dependencies and removed unused shared_preferences dependency
flutter_local_notifications - flutter_local_notifications-v11.0.0

Published by MaikuB about 2 years ago

  • Bumped timezone dependency. To err on the safe when it comes to dependency version conflicts, this is being published as major release as the updated timezone package was published as a major release. Thanks to the PR from Joachim Nohl
flutter_local_notifications - flutter_local_notifications-v10.0.0

Published by MaikuB about 2 years ago

  • Breaking change [Android] zonedSchedule()'s implementation has switched to using desugaring instead of the ThreeTen Android Backport library. This required the plugin to update to using Android Gradle plugin 4.2.2 and applications may need to bump their Android Gradle plugin dependency to at least 4.2.2 as a result. Added a "Gradle setup" section underneath "Android setup" with details on the extra setup needed
  • [Android] Breaking change the following error codes included in PlatformExceptions that can occur on Android have been updated
    • INVALID_ICON -> invalid_icon
    • INVALID_LARGE_ICON -> invalid_large_icon
    • INVALID_BIG_PICTURE -> invalid_big_picture
    • INVALID_SOUND -> invalid_sound
    • INVALID_LED_DETAILS -> invalid_led_details
    • GET_ACTIVE_NOTIFICATIONS_ERROR_CODE -> unsupported_os_version
    • GET_NOTIFICATION_CHANNELS_ERROR_CODE -> getNotificationChannelsError
    • GET_ACTIVE_NOTIFICATION_MESSAGING_STYLE_ERROR_CODE -> getActiveNotificationMessagingStyle
    • PERMISSION_REQUEST_IN_PROGRESS -> permissionRequestInProgress
  • [Android] Breaking change the category of the AndroidNotificationDetails now requires an instance of the newly added AndroidNotificationCategory class instead of a string. This was to improve the discoverability of the APIs and improve the semantics as the category can specified in a similar fashion to using an enum value
  • Breaking change callbacks have now been reworked. There are now the following callbacks and both will pass an instance of the NotificationResponse class
    • onDidReceiveNotificationResponse: invoked only when the app is running. This works for when a user has selected a notification or notification action. This replaces the onSelectNotification callback that existed before. For notification actions, the action needs to be configured to indicate the the app or user interface should be shown on invoking the action for this callback to be invoked i.e. by specifying the DarwinNotificationActionOption.foreground option on iOS and the showsUserInterface property on Android. On macOS and Linux, as there's no support for background isolates it will always invoke this callback
    • onDidReceiveBackgroundNotificationResponse: invoked on a background isolate for when a user has selected a notification action. This replaces the onSelectNotificationAction callback
  • Breaking change the NotificationAppLaunchDetails has been updated to contain an instance NotificationResponse class with the payload belonging to the NotificationResponse class. This is to allow knowing more details about what caused the app to launch e.g. if a notification action was used to do so
  • [iOS][macOS] Breaking changes iOS and macOS classes have been renamed and refactored as they are based on the same operating system and share the same notification APIs. Rather than having a prefix of either IOS or MacOS, these are now replaced by classes with a Darwin prefix. For example, IOSInitializationSettings can be replaced with DarwinInitializationSettings
  • [macOS] Breaking change the requestPermissions() method of the MacOSFlutterLocalNotificationsPlugin class now only accepts non-nullable parameters that default to false. This makes it consistent with the iOS implementation of the plugin
  • Added support for notification actions. Massive thanks to Sebastian Roth, Pieter van Loon and Yaroslav Pronin for their work on this. Note that on Apple's platforms, notification actions are only supported on iOS 10 or newer and macOS 10.14 or newer
  • [Linux] Breaking change the linux notification categories defined by LinuxNotificationCategory no longer has factory constructors but has static constant fields instead to make the semantics more similar to access enum values
  • [Android] Updated how scheduled notifications are saved to shared preferences so it is done in the background. This is to fix issue 1378 where pendingNotificationRequests method may not report the correct number of scheduled notifications if it is invoked before the data had been saved to shared preferences
  • [Android] fixed issue 1702 by handling deprecation warnings using specific Android Intent APIs on Android 13 (API level 33) or newer
  • [iOS] getActiveNotifications() is now supported for iOS versions 10.0 or newer
  • [macOS] getActiveNotifications() is now supported for macOS versions 10.14 or newer
  • [iOS][macOS] thanks to the PR from maprohu, the following features are now available
    • the ability to request permissions to show critical notifications
    • the ability to specify the interruption level of a notification. This is only applicable to iOS 15.0 and macOS 12.0 or newer.
  • Updated minimum Flutter version to 2.8 as that aligns with the minimum Dart SDK version of 2.1.5 required by one of flutter_local_notifications_linux's dependencies (dbus)
  • Example app has been updated so that each notification has its own notification ID. Previously, they were all given a notification ID of 0
  • Updated Android setup docs to mention setting up compileSdkVersion
flutter_local_notifications - flutter_local_notifications-v10.0.0-dev.23

Published by MaikuB about 2 years ago

  • Fixed issue 1694 where tree-shaking was removing code related to background isolates and thereby preventing notification actions from firing. Readme has also been updated as applications will need to annotate functions invoked by the onDidReceiveBackgroundNotificationResponse callback with the @pragma('vm:entry-point') annotation as well. The example and docs have been updated to remove usages of the IsolateNameServer APIs due to issues in release builds. If anyone knows how to get these working then please submit a PR
flutter_local_notifications - flutter_local_notifications-v10.0.0-dev.22

Published by MaikuB about 2 years ago

  • Updated minimum Flutter version to 2.8 as that aligns with the minimum Dart SDK version of 2.1.5 required by one of flutter_local_notifications_linux's dependencies (dbus)
  • Includes changes from 9.9.1
flutter_local_notifications - flutter_local_notifications-v9.9.1

Published by MaikuB about 2 years ago

  • [Android] plugin has been updated to minimise clashing with other plugins that handle permission requests. Thanks to the PR from Tiernan