- Added macOS implementation of the plugin
- The
schedule,showDailyAtTimeandshowWeeklyAtDayAndTimemethods has been marked as a deprecated due to problems with time zones, particularly when it comes to daylight savings. - Added the
zonedSchedulemethod 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. Applications will need to retrieve the device's local IANA timezone ID via native code or a plugin (e.g.flutter_native_timezone). Note that to support time zone-based scheduling, the plugin now depends on thetimezonepackage so that an instance of theTZDateTimeclass 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] Fixed issue [670] where
getNotificationAppLaunchDetails()behaved inconsistently depending on if it was called before or afterinitialize() - [Android] Added the
getActiveNotifications()method to theAndroidFlutterLocalNotificationsPluginclass thanks to the PR from Vincent Kammerer. This can be used to query the active notifications and is only applicable to Android 6.0 or newer - [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
androidAllowWhileIdleboolean argument to theperiodicallyShowmethod. When set to true, this changes how recurring notifications are shown so that the AndroidAlarmManagerAPI 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 theAlarmManagerAPIs 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 - [Android] Added support for full-screen notifications via the
fullScreenIntentargument that has been added to the constructor of theAndroidNotificationDetailsclass. Thanks to the PR from Nadav Fima - [Android] Bumped compile SDK to 30 (Android 11)
- [Android] Added ability to specify shortcut id that can be used for conversations. See https://developer.android.com/guide/topics/ui/conversations for more info. Note the plugin doesn't provide the ability to publish shortcuts so developers will likely need to look into writing their own code to do so and save the shortcut id so that it can be linked to notifications
- [iOS] Updated the details in the plugin's podspec file
- [iOS] Added ability to specify a subtitle for a notification via the
subtitleproperty of theIOSNotificationDetailsclass. This property is only application to iOS versions 10 or newer - Breaking change The
InitializationSettingsandNotificationDetailsclasses no longer have positional parameters but now have named parameters calledandroidandiOSfor passing in data specific to Android and iOS. TheremacOSnamed parameter has also been added for passing data specific to macOS - Breaking change The
toMapmethod 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
DayAndroidNotificationChannelActionImportance(note: asdefaultis a keyword, what use to beDefaultis nowdefaultImportance)Priority(note: asdefaultis a keyword, what use to beDefaultis nowdefaultPriority)GroupAlertBehaviorNotificationVisibilityRepeatInterval
- Breaking change assertions have been added to the
IOSInitializationSettingsconstructor 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 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
- Updated and fixed wording in API docs
- Readme now has a table of contents. Thanks to the PR from Ascênio
This was incorrectly published in the 1.5.0 update