New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cordova-plugin-local-notification

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-plugin-local-notification - npm Package Versions

1.1.3

Diff

Changelog

Source

Version 1.1.3 (15.02.2025)

Android

  • fix(crash): ArrayIndexOutOfBoundsException can occur, if the user dismisses a permission request without clicking a button
    • Reported by #UzverNumber47. Thanks :)
katzer
published 1.1.2 •

Changelog

Source

Version 1.1.2-dev

Android

  • Bugfix for input actions: Make PendingIntent for actions mutable. Fixes a crash when using input actions
  • New methods for handling unused app restrictions settings
    • getUnusedAppRestrictionsStatus: Gets the status of the unused app restrictions status
    • openManageUnusedAppRestrictions: Opens the settings for controlling the unused app restrictions status

iOS

  • Fix warnigs when using cordova-ios 8.0.0
    • Remove wrong named params from code documentation.

Common

  • Improve documentation
katzer
published 1.1.1 •

Changelog

Source

Version 1.1.1 (24.01.2025)

Android

  • SCHEDULE_EXACT_ALARM is not pre-configured anymore by this plugin to have more flexibility. If you want exact alarms, see Schedule exact alarms.
  • You can declare USE_EXACT_ALARM to set your app as a calendar or alarm clock app. See Exact alarms: Define your app as a Calender or Alarm Clock app
  • Renamed property vibrate to androidChannelEnableVibration
  • Image resources: Support res://, www and shared:// for attachments and attachments.personIcon

iOS

  • Since iOS 14: Show a notification in the notification center when the app is in foreground, like on Android. Happens also if iOSForeground is false.

Common

  • Improved documentation
  • Renamed internal plugin method check to hasPermission to make it consistent with cordova.plugins.notification.local.hasPermission
katzer
published 1.1.0 •

Changelog

Source

Version 1.1.0 (23.12.2024)

  • Improve documentation
  • Documentation of properties

Changes for Android

  • Handling Android channels:
  • Changed default channel id from default-channel-id to default_channel
  • Bugfix: Make cancel/cancelAll/clear/clearAll work again. This was broken since Version 1.0.0 because of the change "Use app name as a tag for the notify call PR #1781". For e.g. notifications were still in the statusbar, when clearing a notification.
  • Bugfix: java.lang.IllegalStateException: Maximum limit of concurrent alarms 500 reached, when canceling notifications and schedule new notifications
    • When canceling a notification, the saved data for the notification was removed from the app and also a posted notification from the statusbar, but the alarm itself, which would create the notification, not. This was due to a wrongly created intent for clearing the scheduled alarms.
  • Bugfix: Reschedule notifications, when app is updated
    • Android clears all pending alarms, when an app is updated, this was not properly handled.
  • Bugfix: Remove wrongly used intent-filter LOCKED_BOOT_COMPLETED
    • The intent-filter LOCKED_BOOT_COMPLETED is executed, when the device was booted, but not yet unlocked by the user (e.g. the device is looked by a pin). To use this feature, the device encrypted storage has to be used, which is accessible by context.createDeviceProtectedStorageContext(). This has first to be implemented and was not implemented.
  • React on SCHEDULE_EXACT_ALARM_PERMISSION_STATE_CHANGED when app is closed and not only in the background
  • Added onlyAlertOnce option
  • Removed option mediaSession and the corresponding MediaStyle. This was not functional and also needed the extra Android library android:media.
Changes in resource handling
  • Added resource uri shared://, to set at runtime created resources for e.g. a sound, androidLargeIcon, etc.
  • Added resource path www to access www-files
  • Removed resource uris http, https. You can use for this the shared dirctory and a shared: uri.
  • Removed resource uri file:///. file uris should not be used in Android.
  • Removed resource uri content:. You can instead use a shared:// uri.
Code fixes and cleanup
  • General code clenaup
  • Removed Plugin dependency cordova-plugin-badge and ShortcutBadger. These were only used for Android. Android can handle the badging itself and does not need a 3rd party library. You can configure the behaviour by the badgeNumber property.
  • Use FLAG_IMMUTABLE on every Android version
    • Before it was set since Android 12, now since Android 7, to make the code consistent between all Android versions.
  • Bugfix: Catch any exceptions when attempting to get option for a notification
  • Removed subfolder notification and correct package declaration de.appplant.cordova.plugin.notification to de.appplant.cordova.plugin.localnotification
  • Added androidx.core:core package version 1.12.0 for using NotificationManagerCompat
    • The version is cofigurable by ANDROIDX_CORE_VERSION.
    • Added kotlin-bom to fix duplicate classes errors.
  • Removed Android Support Library leftovers com.android.support:support-v4 from plugin.xml
    • This was overlooked, when switched to Android X.
  • Removed android:media Library: This was used for MediaSytle, which was removed.
  • Gradle: Removed deprecated repository jcenter. The appeareance of jcenter as a repository, produced the gradle warning Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
  • Always set the receiver class for alarms to TriggerReceiver.class, so it's easier to cancel alarms.

Changes for iOS

  • Plugin compatibility for upcoming cordova-ios version 8.0.0
  • package.json: Correct incorrect cordova-ios dependency
    • Version 10.0.0 was referenced, but the maximum available version currently is 7.1.1
    • Correct version also for old plugin version 0.9.0-beta.3
  • New method iOSClearBadge for clearing the badge on iOS.
  • Added resource path www to access www-files

Changed properties

Some properties were changed. See Changes since version 1.1.0

Other changes

  • Renamed plugin action request to requestPermission
katzer
published 1.0.0 •

Changelog

Source

Version 1.0.0 (17.08.2024)

This Release contains mainly changes and fixes for the Android platform.

  • Make Plugin compatible with Android 12-14
  • Support Android X
  • Minimum supported Android version is 7.0 (SDK 24). The target SDK is increased to 34 (Android 14).
  • Remove obsolete Windows platform
  • Fix crash with target Android 12 (SDK 31) which occured because of a pendingIntent change and not using PendingIntent.FLAG_IMMUTABLE
  • Fix click notifications in Android 12
  • Declare SCHEDULE_EXACT_ALARM permission, which is necessary for scheduling exact alarms since Android 12 (API 31). It is only pre-granted on Android 12. On Android 13 and newer, the user must grant the permission in the "Alarms & Reminders"-setting, if you still want exact alarms. If the permission is not granted, notifications will be scheduled inexact, which is still ok for the normal case.
  • Request POST_NOTIFICATIONS permission in Android 13 (API 33)
  • New methods for exact alarms:
    • canScheduleExactAlarms(successCallback, scope) - Android only. Checks if the user has enabled the "Alarms & Reminders"-setting. If not, the notificiatons will be scheduled inexact, which is still ok and will only be delayed by some minutes.
      • On Android 12 the permission is granted by default
      • On Android 13 and newer, the permission is not granted by default and have to be explicitly enabled by the user.
      • On Android 11 and older, this method will always return true in the successCallback.
    • openAlarmSettings(successCallback, scope) - Android only. Opens the "Alarms & Reminders"-settings as an Activity when running on Android 12 (SDK 31) or later, where the user can enable exact alarms. On Android older then 12, it will just call the successCallback, without doing anything. This method will not wait for the user to be returned back to the app. For this, the resume-event can be used. The callback will just return OK, after starting the activity.
      • If the user grants permission, already inexact scheduled notifications will automatically be rescheduled as exact alarms, but only if the app is still available in background.
      • If exact alarms were alreay granted and the user revokes it, the app will be killed and all scheduled notifications will be canceld. The app have to schedule the notifications as inexact alarms again, when the app is opened the next time, see https://developer.android.com/develop/background-work/services/alarms/schedule#using-schedule-exact-permission.
    • openNotificationSettings(successCallback, scope) - Opens the notifications settings of the app on Android 8 and newer. This method will not wait for the user to be returned back to the app. For this, the resume-event can be used.
      • On Android, the callback will just return "OK", after starting the activity.
      • On Android older then 8, it opens the app details.
      • On iOS it's not possible to open the notification settings, it will open the app settings.
  • Support sender image by new option personIcon
  • Initialize the sender as empty String instead of "Me" (PR #1781)
  • Reuse existing messages when using MessagingStyle (PR #1781). With this fix, users won't have to cache the messages in their Javascript code, the plugin will automatically check if there is an active notification with that ID and append the new messages to the existing ones. This will only be done when using MessagingStyle, which will be used, if the option text is filled with an Array instead of a String.
  • Added count of messages in a notification, wenn using Array for text. (PR #1781)
    • Added option titleCount to modify the count text of messages in a notification. The placeholder %n% can be used for inserting the messages count. If nothing is set, the text (%n%) will be used.
  • Use app name as a tag for the notify call (PR #1781)
  • Use correct authority name (PR #1853)
  • Replace compile() with implementation() in localnotification.gradle, because starting on Gradle 7.0 the compile-method is removed and will produce errors, like Could not find method compile() for arguments...
  • Raise minimum Version for Cordova dependencies
    • Cordova to 12
    • cordova-android to 13

A lot of changes were adopted from moodlemobile. Thanks for the work!

katzer
published 0.9.0-beta.3 •

Changelog

Source

Version 0.9.0-beta.3 (13.02.2018)

katzer
published 0.9.0-beta.2 •

Changelog

Source

Version 0.9.0-beta.2 (11.01.2018)

katzer
published 0.9.0-beta.1 •

Changelog

Source

Version 0.9.0-beta.1 (11.11.2017)

agussaputra
published 0.8.4 •

Changelog

Source

Version 0.8.4 (04.01.2016)

  • Bug fixes
  • SyntaxError: missing ) after argument list
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc