Skip to content

Releases: katzer/cordova-plugin-local-notifications

Release 1.2.3

22 Nov 15:37

Choose a tag to compare

Android

  • Bugfix: Make Actions persistent
    • Actions were not stored persistent. If the app was killed and a notification appeared, the actions were not shown anymore.
    • Fixes Issue #2090.
  • Auto dismiss notifications with input action: A clear does not work on notifications with input fields. Google recommends to update the notificiation after an input was made without adding actions. The input does this and removes the notification after a short delay. Fixes Issue #2080.
  • Bugfix: Use Object.assign instead of spread in object literals in local-notification.js, to make this plugin work with an Android 7 emulator, where the WebView can't be updated
  • Some code refactoring

Common

  • Readme: Improve documenation of actions and events

Release 1.2.2

12 Oct 10:08

Choose a tag to compare

iOS

  • Ignore deprecation warning about using UNNotificationPresentationOptionAlert
    • XCode could give a deprecation warning about using UNNotificationPresentationOptionAlert which is deprecated since iOS 14. The code is already written in such a way that it can only be used on iOS 13 and older versions. So ignore the deprecation warning.

Common

  • Add plugin method getDefaults back
    • The getDefaults method was accidentally removed in version 1.1.0
    • Thanks to @randnetdd who reported this issue
    • Fixes #2088

Release 1.2.1

14 Aug 21:06

Choose a tag to compare

Android

  • Bugfix: Prevent NullPointerException for trigger and clear
    • It could happen, that a NullPointerException occurred, when a notification was triggered or a user cleared a notification, because the notification data was not found any longer in the SharedPreferences
  • Bugfix: Handle crash when updating from plugin version 0.9-beta.3 and notifications were already scheduled with the old plugin version.
    • This was due to not handling correctly the -beta in the version string 0.9-beta.3 when trying to convert the string to an int. Now the pre-release identifiers -dev and -beta will be removed, before the version string will be converted to an int.
    • Fixes #2087
  • Update meta.version of scheduled notifications from older plugin versions to the current plugin version. So if notifications were scheduled by version 1.2.0, it will be updated to 1.2.1, when the app is updated.

Release 1.2.0

02 Jul 20:18

Choose a tag to compare

Common

  • Bugfix: Don't filter out notifications where trigger.at is not set: Notifications were filtered out when something other than trigger.at was set like trigger.in, or trigger.every

Release 1.1.9

12 Jun 06:46

Choose a tag to compare

Android

  • Bugfix: Subsequent notifications were ignored, when posting them without trigger.at: If no trigger.at was set, it was set to the current time, but due shallow copying the default properties, the trigger-property of the defaults was changed also to that time and all subsequent notifications were getting the time which resulted in being ignored.

Release 1.1.8

25 May 12:58

Choose a tag to compare

Contains Android changes only.

Android

  • Bugfix: Handle passed trigger.at dates: If trigger.at lays more then 5 seconds in the past, ignore it, otherwise keep sure, it will be posted on iOS and Android by setting the trigger time 5 seconds in the future.
  • Bugfix: Open app when notification clicked. The app was not opened anymore, when a notification was clicked
  • Bugfix: Already posted notifications could not be updated
  • Bugfix: Already posted notifications will be shown again, when the app updates or the device reboots.
  • Bugfix: Setting no trigger date fired endless notifications
    • trigger.at will always be set, when no trigger is set. The current time will be used as trigger.at then.
  • Bugfix: trigger.unit and trigger.every (String) could fail in different user locales. The value of those two properties was upper cased by String.toUpperCase() and turned after into an Enum. The method String.toUpperCase() is locale aware and will use the current user locale to upper case the string. In Turkish, for e.g., the value minute would become upper cased to MİNUTE where the I has a dot above it and would not recognized as an Enum. Now enums will not be used anymore and the values are taken as they come from JavaScript and are expected to be lower cased like minute, hour etc.
    • Thanks TheNotorius0 for sharing his experiences in issue 2060 as a comment and also pahenator for initially posting the issue.
    • Thanks iamAdamGoodman noting that trigger.at was not functioning after adding these changes in issue 2070
    • Throw exception if the trigger property is set wrong
  • Bugfix: Use cordova-android default Kotlin support mechanism. The plugin has bypassed cordova-android default Kotlin support mechanism by defining kotlin-bom in localnotification.gradle. To enable Cordova-Android's Kotlin support, the preference flag GradlePluginKotlinEnabled is set to true in plugin.xml and kotlin-bom was removed. Fixes #2076
  • Set default notification id to 1 instead of 0
  • Code refactoring
    • Renamed DateTrigger.java to TriggerHandler.java
    • Added OptionsTrigger which is a helper to read the trigger properties
    • Split IntervalTrigger in TriggerHandlerAt, TriggerHandlerIn and TriggerHandlerEvery, to better refelect the trigger options
    • Rename MatchTrigger to TriggerHandlerEvery
    • Remove BuilderCreator and move code to Notification
    • Move notification show code from TriggerReceiver to Notification

Release 1.1.7

22 Mar 10:03

Choose a tag to compare

Fix for npm: The dev version 1.1.6-dev was accidentally published to npm and there were also problems with version 1.1.6. Correct this to 1.1.7.

Release 1.1.6

22 Mar 09:57

Choose a tag to compare

Fix for npm: The dev version 1.1.6-dev was accidentally published to npm. This will correct this as published as 1.1.6.

Release 1.1.5

22 Mar 09:41

Choose a tag to compare

Android

  • Bugfix: Don't crash when getting none existent notification. Calling cancel could crash the app, if a notification does not exist for an id.

Release v1.1.4

21 Mar 20:06

Choose a tag to compare

Android

  • Restore notifications correctly from old plugin versions
    • Old properties were only corrected in JavaScript, but not on Java. If an app was updated with the new plugin version and had scheduled notifications before, the notifications could be triggered with no sound and the default smallIcon would always be used.
    • Fixes Issue 2059
  • Refactor trigger handling
    • DateTrigger: Set occurrence initial to 0 (not 1)
    • Don't schedule all occurrences at once when trigger.count is set. Schedule one after the other, like it's done when trigger.count is not set
    • Repeating notification: Don't cancel previously posted notification, when scheduling next notification, fixes Issue 2059
    • Restore a trigger date exactly like it was before the restoration
    • Fallback for false unit value when using trigger: {in: xxx, unit: 'xxx'}
      • Unit minute will be used if unit is set wrong.
      • Fixes Issue 2060
    • Bugfix: Calculation of next trigger.every: The second occurrence of trigger.every was calculated wrong, because the base date was not set to the last trigger date of the last occurrence but instead to the current time. Now the trigger date will be saved in the SharedPreferences of Android and restored when the next occurrence is scheduled and calculated.
    • Bugfix: Only fire add event, if a notification was scheduled successfully. Before it could also be fired, when an error occurred and the notification was not scheduled.
    • Fire event clear or cancel always when a notification is cleared or canceled. Before it could be possible, that these events were not fired though notifications got cleared or canceled.
    • Code changes:
      • Refactor MatchTrigger used for trigger: every { minute: xx, hour: xx, ...}
      • Remove Request.java and use DateTrigger directly in a Notification. Intialise the appropriate DateTrigger when a Notification is created.
      • Rename Builder to BuilderCreator and set the builder directly in a Notification. Don't create a Notification from the Builder.

Common