Does `priority` for local notifications work?

Hi, I’m trying to change priority for my local notifications (need low priority, don’t care about Oreo at the moment). According to the Android API, values range from -2 to 2.

I’ve tried all those values for priority and notice no difference in the priority of notifications.

Does this setting work? I noticed the GitHub page for the plugin says it’s not compatible with Ionic, but Ionic’s page lists priority as a part of its ILocalNotification spec.

Am I doing something wrong? Here’s the command I’m running.

    this.localNotifications.cancel(36731).then(() => {
        this.localNotifications.schedule({
            id: 36731,
            title: "Priority -1",
            text: "Test notification",
            ongoing: false,
            priority: -1,
            sound: null,
            smallIcon: 'res://ic_stat_notify.png',
            icon: 'res://bc_placeholder.png'
        });
    });

Why use a plugin that states it is not compatible with Ionic? if you want to pursue that, I’d suggest you post on the Ionic Native issues page. In the meantime, why not use the phonegap notifications plugin? It’s based on web API which is more Ionic-y anyway.

Because there’s an Ionic wrapper for it that Ionic officially lists.

It appears the Cordova one that doesn’t officially support Ionic is different than the one Ionic lists.

I literally just realized that I had that one installed, not the Ionic one, by running ionic cordova plugin.

So I removed that one, installed the proper Ionic one, and it works great.

So your question is resolved?

Yup! For future reference, I thought I posted in the Ionic Native section. Should I have posted somewhere else?

Now I’m really confused. @mhartington could someone on the Native team please look at this plugin’s readme?

For what it’s worth, here are more details for others now & in the future. This is how the plugin was listed when I first ran ionic cordova plugin:

de.appplant.cordova.plugin.local-notification 0.8.5 "LocalNotification"

The priority option did nothing. Transpiler accepted it (unlike some other options like vibrate which it failed to recognize) but it did nothing.

Then I removed that and ran ionic cordova plugin add cordova-plugin-local-notification as listed in the Ionic Native documentation and ionic cordova plugin then showed:

cordova-plugin-local-notification 0.9.0-beta.2 "LocalNotification"

That did the trick…priority now works.