flutter_local_notifications

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

Stars
2.4K
Committers
119

Bot releases are visible (Hide)

flutter_local_notifications - flutter_local_notifications-v1.5.0-beta.2

Published by MaikuB over 4 years ago

  • Reverted removal of code done in 1.5.0-beta.2 relating notification timestamps as it could prevent notifications from appearing for users of the plugin prior to 0.3.4
  • Cleaned up native iOS code that is no longer needed
  • [iOS] Added ability to specify a subtitle for a notification via the subtitle property of the IOSNotificationDetails class. This property is only application to iOS versions 10 or newer
  • Moved testing section of readme to the bottom of the readme and updated some of the wording
flutter_local_notifications - flutter_local_notifications-v1.4.4+1

Published by MaikuB over 4 years ago

  • Added details that platform-specific implementations can be obtained to the Caveats and limitations section
  • Added a note on restrictions imposed by the OS by Android OEMs that may be prevent scheduled notifications appearing
  • Release configurations section of the readme renamed to Release build configuration
flutter_local_notifications - flutter_local_notifications-v1.5.0-beta.1

Published by MaikuB over 4 years ago

  • Added macOS implementation of the plugin
  • The schedule, showDailyAtTime and showWeeklyAtDayAndTime methods has been marked as a deprecated due to problems with time zones,particularly when it comes to daylight savings.
  • Added the zonedSchedule method to the plugin that allows for scheduling notifications to occur on a specific date and time relative a specific time zone. This can be used to schedule daily and weekly notifications as well. The example app has been updated to demonstrate its usage. Note that to support time zone-based scheduling, the plugin now depends on the timezone package so that an instance of the TZDateTime class is required to the specify the time the notification should occur. This should work in most cases as it is IANA-based and native platforms have time zones that are IANA-based as well. To support time zone aware dates on older versions of Android (which use older Java APIs), the plugin depends on the ThreeTen Android Backport library. Once Flutter's support for Android Studio 4.0 and Android Gradle plugin 4.0 has stabilised, the plugin will be updated to make use of desugaring instead of relying on the ThreeTen Android Backport library.
  • [Android] As part of cleaning up the plugin, I'm removing th kludge I put in version 0.3.4 that I stated I would eventually remove. This was to fix the timestamps of notifications (relates to this issue) scheduled prior to 0.3.4. This will make the plugin more easier to maintain
  • [Android] Fixed an issue where the error message for an invalid source resource wasn't formatted correctly to include the name of the specified resource
  • [Android] Added androidAllowWhileIdle boolean argument to the periodicallyShow method. When set to true, this changes how recurring notifications are shown so that the Android AlarmManager API is used to schedule a notification with exact timing. When the notification appears, the next one is scheduled after that. This is get around the limitations where the AlarmManager APIs don't provide a way for work to be repeated with precising timing regardless of the power mode.
    The example app has been updated to include these changes so that it can be used as a reference as well
  • [iOS] Updated the details in the plugin's podspec file
  • Breaking change The InitializationSettings and NotificationDetails classes no longer have positional parameters but now have named parameters called android and iOS for passing in data specific to Android and iOS. There macOS named parameter has also been added for passing data specific to macOS
  • Breaking change The toMap method that was used internally to transfer data over platform channels is no longer publicly accessible
  • Breaking change All enum values have been renamed to follow lower camel case convention. This affects the following enums
    • Day
    • AndroidNotificationChannelAction
    • Importance (note: as default is a keyword, what use to be Default is now defaultImportance)
    • Priority (note: as default is a keyword, what use to be Default is now defaultPriority)
    • GroupAlertBehavior
    • NotificationVisibility
    • RepeatInterval
  • Breaking change assertions have been added to the IOSInitializationSettings constructor to prevent null values being passed in
  • Updated example app so that code for demonstrating functionality that is specific to a platform are only visible when running on the appropriate platform
  • Bumped e2e dev dependency
  • Bumped Android dependencies
  • Updated example app's Proguard rules file to match latest configuration required by GSON
  • Bumped lower bound of Dart SDK dependency to 2.6
flutter_local_notifications - flutter_local_notifications_platform_interface-v2.0.0-beta.1

Published by MaikuB over 4 years ago

  • BREAKING CHANGE renamed RepeatInterval enum values to use lower camel casing
  • Bump plugin_platform_interface dependency
flutter_local_notifications - flutter_local_notifications-v1.4.4

Published by MaikuB over 4 years ago

  • [iOS] Fixes to ensure that the native completion handlers were called appropriately. If you had some issues using this plugin combined with push notifications (e.g. via firebase_messaging) when the app was in the foreground then I would recommend updating to this version. Thanks to Paweł Szot for picking up the gap in the code in handling the native willPresentNotification call
  • The readme has been been touched up and had some sections rearranged. Thanks to the PR from psyanite
  • Bumped lower bound of Dart SDK dependency to 2.0
flutter_local_notifications - flutter_local_notifications-v1.4.3

Published by MaikuB over 4 years ago

  • [Android] added the ability to specify additional flags for the notification. For example, this could be used to allow the audio to repeat. See the API docs and update example app for more details. Thanks to the PR from andylei
  • Minor cleanup of API docs
flutter_local_notifications - flutter_local_notifications-v1.4.2

Published by MaikuB over 4 years ago

  • [Android] added the ability to specify the timestamp shown in the notification (issue 596). Thanks to the PR from Nicolas Schneider.
  • Fixed API docs for showWeeklyAtDayAndTime
flutter_local_notifications - flutter_local_notifications-v1.4.1

Published by MaikuB over 4 years ago

  • [Android] added the ability to create notification channels before a notification is shown. This can be done by calling the createNotificationChannel within the AndroidFlutterLocalNotificationsPlugin class. This allows applications to create notification channels before a notification is shown. Thanks to the PR from Vladimir Gerashchenko.
  • [Android] added the ability to delete notification channels. This can be done by calling deleteNotificationChannel within AndroidFlutterLocalNotificationsPlugin class.
flutter_local_notifications - flutter_local_notifications-v1.4.0

Published by MaikuB over 4 years ago

Please note that there are a number of breaking changes in this release to improve the developer experience when using the plugin APIs. The changes should hopefully be straightforward but please through the changelog carefully just in case. The steps migrate your code has been covered below but the Git history of the example application's main.dart file can also be used as reference.

  • [Android] BREAKING CHANGE The style property of the AndroidNotificationDetails class has been removed as it was redundant. No changes are needed unless your application was displaying media notifications (i.e. style was set to AndroidNotificationStyle.Media). If this is the case, you can migrate your code by setting the styleInformation property of the AndroidNotificationDetails to an instance of the MediaNotificationStyleInformation class. This class is a new addition in this release

  • [Android] BREAKING CHANGE The AndroidNotificationSound abstract class has been introduced to represent Android notification sounds. The sound property of the AndroidNotificationDetails class has changed from being a String type to an AndroidNotificationSound type. In this release, the AndroidNotificationSound has the following subclasses

    • RawResourceAndroidNotificationSound: use this when the sound is raw resource associated with the Android application. Previously, this was the only type of sound supported so applications using the plugin prior to 1.4.0 can migrate their application by using this class. For example, if your previous code was

      var androidPlatformChannelSpecifics = AndroidNotificationDetails(
        'your other channel id',
        'your other channel name',
        'your other channel description',
        sound: 'slow_spring_board');
      

      Replace it with

      var androidPlatformChannelSpecifics = AndroidNotificationDetails(
        'your other channel id',
        'your other channel name',
        'your other channel description',
        sound: RawResourceAndroidNotificationSound('slow_spring_board');
      
    • UriAndroidNotificationSound: use this when a URI refers to the sound on the Android device. This is a new feature being supported as part of this release. Developers may need to write their code to access native Android APIs (e.g. the RingtoneManager APIs) to obtain the URIs they need.

  • [Android] BREAKING CHANGE The BitmapSource enum has been replaced by the newly AndroidBitmap abstract class and its subclasses. This removes the need to specify the name/path of the bitmap and the source of the bitmap as two separate properties (e.g. the largeIcon and largeIconBitmapSource properties of the AndroidNotificationDetails class). This change affects the following classes

    • AndroidNotificationDetails: the largeIcon is now an AndroidBitmap type instead of a String and the largeIconBitmapSource property has been removed
    • BigPictureStyleInformation: the largeIcon is now an AndroidBitmap type instead of a String and the largeIconBitmapSource property has been removed. The bigPicture is now a AndroidBitmap type instead of a String and the bigPictureBitmapSource property has been removed

    The following describes how each BitmapSource value maps to the AndroidBitmap subclasses

    • BitmapSource.Drawable -> DrawableResourceAndroidBitmap
    • BitmapSource.FilePath -> FilePathAndroidBitmap

    Each of these subclasses has a constructor that an argument referring to the bitmap itself. For example, if you previously had the following code

    var androidPlatformChannelSpecifics = AndroidNotificationDetails(
      'your other channel id',
      'your other channel name',
      'your other channel description',
      largeIcon: 'sample_large_icon',
      largeIconBitmapSource: BitmapSource.Drawable,
    )
    

    This would now be replaced with

    var androidPlatformChannelSpecifics = AndroidNotificationDetails(
      'your other channel id',
      'your other channel name',
      'your other channel description',
      largeIcon: DrawableResourceAndroidBitmap('sample_large_icon'),
    )
    
  • [Android] BREAKING CHANGE The IconSource enum has been replaced by the newly added AndroidIcon abstract class and its subclasses. This change was done for similar reasons in replacing the BitmapSource enum. This only affects the Person class, which is used when displaying each person in a messaging-style notification. Here the icon property is now an AndroidIcon type instead of a String and the iconSource property has been removed.

    The following describes how each IconSource value maps to the AndroidIcon subclasses

    • IconSource.Drawable -> DrawableResourceAndroidIcon
    • IconSource.FilePath -> BitmapFilePathAndroidIcon
    • IconSource.ContentUri -> ContentUriAndroidIcon

    Each of these subclasses has a constructor that accepts an argument referring to the icon itself. For example, if you previously had the following code

    Person(
      icon: 'me',
      iconSource: IconSource.Drawable,
    )
    

    This would now be replaced with

    Person(
      icon: DrawableResourceAndroidIcon('me'),
    )
    

    The AndroidIcon also has a BitmapAssetAndroidIcon subclass to enables the usage of bitmap icons that have been registered as a Flutter asset via the pubspec.yaml file.

  • [Android] BREAKING CHANGE All properties in the AndroidNotificationDetails, DefaultStyleInformation and InboxStyleInformation classes have been made final

  • The DefaultStyleInformation class now implements the StyleInformation class instead of extending it

  • Where possible, classes in the plugins have been updated to provide const constructors

  • Updates to API docs and readme

  • Bump Android dependencies

  • Fixed a grammar issue 0.9.1 changelog entry

flutter_local_notifications - flutter_local_notifications-v1.3.0

Published by MaikuB over 4 years ago

  • [iOS] BREAKING CHANGE Plugin will now throw a PlatformException if there was an error returned upon calling the native addNotificationRequest method. Previously the error was logged on the native side the using NSLog function.
  • [iOS] Added ability to associate notifications with attachments. Only applicable to iOS 10+ where the UserNotification APIs are used. Thanks to the PR from Pavel Sipaylo
  • Updated readme on using firebase_messaging together with flutter_local_notifications to let the community that firebase_messaging 6.0.13 can be used to resolve compatibility issues around callbacks when both plugins are used together
flutter_local_notifications - flutter_local_notifications-v1.2.2

Published by MaikuB over 4 years ago

  • [Android] Added ability to specify if the timestamp for when a notification occurred should be displayed. Thanks to the PR from mojtabaghiasi
flutter_local_notifications - flutter_local_notifications-v1.2.1

Published by MaikuB over 4 years ago

  • [Android] Fixed issue 512 where calling getNotificationAppLaunchDetails() within the onSelectNotification callback could indicating that the app was launched by tapping on a notification when it wasn't the case
  • Update example app to indicate if a notification launched the app and include the launch notification payload
flutter_local_notifications - flutter_local_notifications-v1.2.0+4

Published by MaikuB over 4 years ago

  • Title at the top of the readme is now the same name as the plugin
  • Updated readme to add subsections under the Android and iOS integration guide
  • Added links in the readme under the Android release build configuration section that point to the configuration files used by the example app
flutter_local_notifications - flutter_local_notifications-v1.2.0+3

Published by MaikuB over 4 years ago

  • Updated API docs for resolvePlatformSpecificImplementation() method
flutter_local_notifications - flutter_local_notifications-v1.2.0+2

Published by MaikuB over 4 years ago

  • Make the static values propeerty of the Priority class return List<Priority> instead of being dynamic and added API docs for the property.
flutter_local_notifications - flutter_local_notifications-v1.2.0+1

Published by MaikuB over 4 years ago

  • The static values properties for the Day and Importance classes now return List<Day> and List<Importance> respectively instead of being dynamic
  • Added more public API documentation
  • Updated readme to move issues and contributions section to the readme within the repository
  • Added screenshots to readme
  • Updated how breaking changes are highlighted in changelog to all the letters aren't capitalised
flutter_local_notifications - flutter_local_notifications-v1.2.0

Published by MaikuB over 4 years ago

  • Added the resolvePlatformSpecificImplementation() method to the FlutterLocalNotificationsPlugin class. This can be used to resolve the underlying platform implementation in order to access platform-specific APIs.
  • Breaking change the static instance properties in the IOSFlutterLocalNotificationsPlugin and AndroidFlutterLocalNotificationsPlugin classes have been removed due to addition of the resolvePlatformSpecificImplementation()
  • Updated readme to remove use of new keyword in code snippets
  • Bumped e2e dependency
  • Bumped example app dependencies
  • Make the pedantic dev_dependency explicit
flutter_local_notifications - flutter_local_notifications-v1.1.7

Published by MaikuB over 4 years ago

  • [iOS] Added requestPermissions() method to IOSFlutterLocalNotificationsPlugin class. This can be used to request notification permissions separately from plugin initialisation. To facilitate this the IOSFlutterLocalNotificationsPlugin and AndroidFlutterLocalNotificationsPlugin now expose a static instance property that can be used obtain the platform-specific implementation of the plugin so that platform-specific methods can be used. Thanks to the PR from Dariusz Łuksza
  • Updated documentation to clarify that getNotificationAppLaunchDetails() is intended to be used more on if a notification from this plugin triggered launch an application
  • Updated API docs for consistency and to better follow the guidelines on effective Dart documentation.
flutter_local_notifications - flutter_local_notifications-v1.1.6

Published by MaikuB over 4 years ago

  • [iOS] Added ability to set badge number. Thanks to PR from FelixYew
  • Fixed a spelling mistake in the 1.1.5+1 changelog entry
flutter_local_notifications - flutter_local_notifications-v1.1.5+1

Published by MaikuB over 4 years ago

  • No functional changes. Fixed a reported formatting issue.
  • Mention removal of named constructor argument in 1.1.0 changelog entry
  • Add API docs to FlutterLocalNotificationsPlugin.private() on how it could be used for testing
  • Update notes on testing to mention that the FlutterLocalNotificationsPlugin.private() named constructor may be of use
Package Rankings
Top 0.59% on Pub.dev
Related Projects