Skip to main content

awesome_notifications 1.0.0-dev.11 copy "awesome_notifications: ^1.0.0-dev.11" to clipboard
awesome_notifications: ^1.0.0-dev.11 copied to clipboard

A complete solution to create Local and Push Notifications, customizing buttons, images, sounds, emoticons and applying many different layouts for Flutter apps.

1.0.0-dev.11 #

  • Breaking: requestPermissionToSendNotifications takes openSettingsWhenDenied (default false). When the user has denied the permission, the method answers at once instead of opening the app's settings; pass true to open them, as 0.12.1 did (Android, iOS, macOS and Windows).
  • Android: after a request, FullScreenIntent and Provisional are no longer answered as missing on Android 8+, and on Android 7 the channel's switches are only turned on for what the user granted, never off, as in 0.12.1.
  • Android, iOS and macOS: requestPermissionToSendNotifications without a permission list fails with "Permission list is required", as in 0.12.1, instead of answering that nothing is missing.
  • iOS: isNotificationAllowed answers true in an App Clip with temporary notifications and in the Notification Service Extension, as in 0.12.1.
  • Windows: showNotificationConfigPage opens the notification settings.
  • iOS and macOS: requestPermissionToSendNotifications asks again as 0.12.1: only for the permissions still missing, and for critical alerts and provisional notifications too, and it turns the channel's switches on for what the user granted. It answered every requested permission as missing when the user refused one.
  • iOS and macOS: the title, body, summary and button labels are shown without their HTML, as the user would read it: <br> and </p> become line breaks, the other tags are removed and the basic entities are read (&amp; → &). The summary is shown again as the subtitle. The app receives the original text.
  • Windows: the toasts show the texts without their HTML, with the same rules.
  • titleWithoutHtml and bodyWithoutHtml follow the same rules: line breaks for <br> and </p>, entities read.
  • Action buttons built from a map (a push, or createNotificationFromJsonData) ask for typed text only with requireInputText: true, as the constructor does. Before, a button without the key asked for it.
  • Windows: notifications reach the screen; the permission is read on apps without a package identity; the badge shows on the taskbar button.
  • Windows: scheduled notifications reach the screen on a fresh install.
  • Windows: a file:// image path is read.
  • Android: a tap that brings the app back from the background is an action in Background, and a dismiss is stamped with the app's lifecycle at that moment, as in 0.12.1. They were always Foreground.
  • iOS: a tap or a dismiss is stamped with the app's lifecycle at that moment, as in 0.12.1, instead of always Foreground. A push shown by the Notification Service Extension is created and displayed with the app's lifecycle (Foreground, Background or Terminated), instead of always Terminated. An app closed from the app switcher is Terminated: the extension checks that the app's process still exists, as the system never tells the app it was closed.

1.0.0-dev.10 #

  • Requires Flutter 3.44 (Dart 3.12) or later. Android: the plugin uses Flutter's built-in Kotlin instead of applying the Kotlin Gradle Plugin, which future Flutter versions will refuse.
  • README: restructured for the 1.0.0 packages. It covers the core only and points to the package of each feature (schedules, translations, push…), whose README has its setup and details.
  • iOS: a push its provider marks as already received is shown by the Notification Service Extension without its created and displayed events again (idempotency of awesome_notifications_fcm). Web: the service worker drops a repeated push.
  • Web: the notifications are shown by a service worker the plugin registers by itself. They have action buttons, their clicks reach the app after a reload, and a click that brings the app opens it when its tab was closed, as the launch action (getInitialNotificationAction). Without a secure page (https or localhost) the page notifications are used, as before.
  • Web: getInitialNotificationAction answers the click that opened the app.
  • iOS and macOS: the notification delegate another plugin (or the app) had set keeps receiving the notifications that aren't this plugin's, and also sees the taps on the pushes this plugin shows. This plugin still decides how its own notifications are presented, and reports their events as before.
  • Push add-ons can keep a push's own keys in the notification shown: in its userInfo on iOS and macOS, and on Android in its extras and in the intent its tap opens. The app and other push plugins can then recognize the push. The core's own keys always win, and these keys aren't part of the notification's events.
  • Android: ResourceImage (and ReceivedNotification.largeIconImage / bigPictureImage with a resource:// image) loads the image again. getDrawableData failed on any reference with the resource:// prefix.
  • iOS and macOS: CocoaPods support. CocoaPods trunk no longer accepts new pods, so the IosAwnCore pod ships inside this package: with CocoaPods, add pod 'IosAwnCore', :path => ... to the app's Podfile (see the iOS and macOS setup). Swift Package Manager needs nothing.

1.0.0-dev.9 #

  • Android: upgrading the package without flutter clean could leave classes out of the app, in debug and in release (a missing class at run time, or an app that doesn't compile), because of Kotlin's incremental compilation. Each package now compiles again when its version changes. An app that is already missing classes is fixed by upgrading to this version, or by flutter clean.

1.0.0-dev.8 #

  • Web: add-ons can rewrite a notification before it's shown, which is how awesome_notifications_localizations translates it.

1.0.0-dev.7 #

  • The display rules (displayOnForeground / displayOnBackground) and the displayed events were checked against 0.12.1 in every app lifecycle:
    • Android: an app whose activity was finished is in Background, not Terminated.
    • iOS and macOS: the displayed events of the notifications shown without the app are delivered when it comes back.
    • macOS: a notification that isn't displayed doesn't stay in Notification Center.
    • Linux: scheduled notifications follow the rules too.
  • iOS: every change of the badge counts. Reading it right after writing it, or incrementing it in a row, could use the old value.
  • iOS: the core ships its privacy manifest (required reason APIs), also in the app's extensions.
  • The Android foreground service is in its own package, awesome_notifications_foreground_service.
  • README: the migration guides of the versions before 0.12.1 were removed.

1.0.0-dev.6 #

Core APIs of 0.12.1 that were missing from the previous 1.0.0 development versions:

  • Badge: getGlobalBadgeCounter, setGlobalBadgeCounter, incrementGlobalBadgeCounter, decrementGlobalBadgeCounter and resetGlobalBadge, the automatic increment of the channels with channelShowBadge and the badge of the notification. On Windows and Linux the counter is kept, but the app icon doesn't show it yet.
  • removeChannel, checkPermissionList, shouldShowRationaleToRequest, getAppLifeCycle and getDrawableData.
  • showNotificationConfigPage, showAlarmPage and showGlobalDndOverridePage open the settings pages (not on Windows and Linux yet).
  • displayOnForeground and displayOnBackground are respected.
  • Invalid notifications are refused with the 0.12.1 errors: a channel that doesn't exist or is disabled, invalid ids, buttons without a key or label.
  • Android: the channels are kept on the device and loaded again when the app starts.
  • Web: a scheduled notification was shown immediately; now createNotification answers false, as schedules aren't supported there.
  • The example shows the badge, layouts, action types, display rules, permissions, channels and app state.
  • Known issue on Linux with Flutter 3.50.1: an invalid request to an add-on (a schedule with an invalid interval, for example) closes the app instead of answering the error, as in the previous development versions. The core's own errors are answered.
  • Not available yet: AndroidForegroundService (it'll be a separate package) and NotificationAndroidCrontab.

1.0.0-dev.5 #

  • Web: the core shows the browser's notifications while the app is open in a tab (JavaScript and WebAssembly):
    • the permission prompt, isNotificationAllowed and the permission statuses (Alert and Sound; the rest is notSupported, as on desktop);
    • title and body, the large icon, the big picture (also the large icon when there's none), the progress bar written into the body, silent channels, locked notifications kept on screen;
    • the four events with the whole content: a tap on the body opens the app, closing it is a dismissal;
    • dismiss / cancel by id, channel, group and all, the status bar list, and the badge.
  • Web: action buttons and taps with the tab closed are planned next (service worker).
  • The example runs in the browser.

1.0.0-dev.4 #

  • The pub.dev screenshot is square, so the search thumbnail shows it whole.

1.0.0-dev.3 #

  • Windows: apps using the plugin build again (MSVC C4275 stopped the build, as Flutter compiles plugins with warnings as errors).
  • pub.dev shows a screenshot of the final notification on iOS and on Android.
  • Web: compatible with WebAssembly (flutter build web --wasm). The web build no longer reaches dart:io.
  • No analyzer warnings with the current Flutter: the deprecated material / cupertino imports and Color.value were replaced, with the same values.
  • The example runs on the Web.
  • Every add-on README lists the whole package family, after its key features.

1.0.0-dev.2 #

  • The four notification events (created, displayed, action, dismissed) reach the app with the full payload in every app state, as in 0.12.1:
    • Events emitted before the app sets its listeners (a launch tap, a push shown with the app killed) are kept and delivered in order once setListeners is called. getInitialNotificationAction(removeFromActionEvents: true) keeps the launch action out of them.
    • iOS: the App Group 0.12.1 used (AwnAppGroupName, or the generated group.awn.…, printed on initialize) shares the channels and the events with the Notification Service Extension.
    • dismissedLifeCycle is filled on a dismissal (it was empty).
    • Android: the created / displayed lifecycles follow 0.12.1 (Terminated with no app listening, Foreground when visible, Background otherwise).
  • isNotificationActiveOnStatusBar and getAllActiveNotificationIdsOnStatusBar work on Android, iOS, macOS, Windows and Linux (0.12.1 always threw).
  • Android: the resources loaded by name (icons, sounds, images, layouts, strings) are kept in release builds automatically: no keep.xml or res_ prefix needed.
  • The README images load from a fixed commit, so they show on pub.dev.

1.0.0-dev.1 #

  • Android: the shared engine (me.carda.android_awn_core) ships inside the package, so the plugin builds from pub.dev.
  • iOS / macOS: the shared engine (IosAwnCore) ships as real files in the package, so it builds with Flutter 3.50.1's copied plugins.
  • Built and tested with Flutter 3.50.1.
  • The README images (banner and screenshots) load from a fixed commit, so they show on pub.dev.

1.0.0-dev #

  • Development preview of the 1.0.0 monorepo.
3.44k
likes
160
points
71.6k
downloads
screenshot

Documentation

API reference

Publisher

verified publishercarda.me

Weekly Downloads

A complete solution to create Local and Push Notifications, customizing buttons, images, sounds, emoticons and applying many different layouts for Flutter apps.

Homepage
Repository (GitHub)
View/report issues
Contributing

License

Apache-2.0 (license)

Dependencies

flutter, flutter_web_plugins, intl, plugin_platform_interface, web

More

Packages that depend on awesome_notifications

Packages that implement awesome_notifications