Is there a working plugin for local notifications?

Anyone knows of a plugin that handles local notifications and works on the latest versions of iOS and Android as well as older ones?

Noted with cordova-plugin-local-notification (4 years old):

  • Android 5-7 works fine. Android 9+ does not.
  • iOS 12 works fine. iOS 15 does not.

I’ve tried numerous others, and even though some are updated recently they don’t work on later platform versions. It might imply a configuration issue (like additional plist info etc), but the question is what.

Thanks in advance.

Hey Anders, I hate to Zombie this thread but did you find a plugin that works?

I found one but it’s way behind and you can’t do custom sounds on Android. What did you end up doing?

I found one that works, to some extent. This one shows notifications in iOS and in some Android, but not all: cordova-plugin-local-notification-12

E.g. it doesn’t show notifications in Xiaomi MIUI/HyperOS.

I use it in CliqTags Nearby that’s available on both stores (free).

Yeah, the whole “local notifications” plugin thing is a fiasco. Android 12 made it worse and 14 has caused a trainwreck. Some that work, don’t allow the creating of channels so you can’t have custom sounds and icons (which I need).

The Katzer developed plugin (pretty much the original) is way out of date (8 years behind on NPM).

I found one that has all the PR’s incorporated but it’s not on npm and it doesn’t have an issues section to open a request ticket and see if the maintainer will post it on npm.

I’m not sure what to do about it… I don’t want to fork it and post it on npm without knowing it works as that would be a complete waste of a few days time figuring all that out.

I had hoped something like this would work on most devices. I use it in my NFC Writer. The device will automatically generate a sound when an NFC tag is detected, and writing takes a fraction of a second, so in this case if it’s missing it doesn’t matter much.

function statusSet(message, positive = true) {
    output_status.style.color = positive ? "#008000" : "#800000";
    output_status.innerHTML = html(message);

    if (message !== "") {
        navigator.notification.beep(1);
        console.log(message);
    }
}

You could though generate sounds via the Media plugin, independent of notifications.

But this highlights some of the issues mentioned in the plugin rating thread.

This is one of the plugins I wish the Cordova team would handle.