NativeScript / plugins

@nativescript plugins to help with your developments.
https://docs.nativescript.org/plugins/index.html
Apache License 2.0
190 stars 108 forks source link

[@nativescript/local-notifications] getScheduledIds() returns ids of notifications that have already been published on Android #343

Open enich-dev opened 2 years ago

enich-dev commented 2 years ago

On Android if you schedule a notification and wait to receive the notification, the notification shows as expected. If you call getScheduledIds() after, that notification ID is still returned in the array and the array continues to grow infinitely unless you explicitly call cancel() or cancelAll().

iOS works as you would expect. Once you receive a notification, that ID no longer returns after calling getScheduledIds().

enich-dev commented 1 year ago

This issue seems to have been fixed in the old plugin https://github.com/EddyVerbruggen/nativescript-local-notifications/issues/77

CatchABus commented 1 year ago

@enich-dev Have you got any app sample to test it with? Going back to unmaintained plugins is always risky so we should try and solve it here.

Also, have you perhaps set interval property in your notification schema?

insytes commented 3 months ago

@enich-dev on Android there is also the option ongoing: boolean. If this set, the scheduled notification will not be removed.