Steffaan / cordova-plugin-local-notifications

Cordova Local Notifications Plugin
Apache License 2.0
31 stars 38 forks source link

Different (and not desired) notification behavior #5

Closed andersborgabiro closed 5 years ago

andersborgabiro commented 5 years ago

Notifications are sticky and full-length whatever options I set.

Your Environment

Expected Behavior

The katzer plugin shows one truncated line of text and the notification disappears on activation or Clear All. Doesn't matter what I set, the behavior is not the same with your plugin.

Actual Behavior

Notifications are sticky and full-length whatever options I set.

Steps to Reproduce

I set this:

    cordova.plugins.notification.local.schedule(
            {
                channel: "Primary",
                id: NOTIFICATIONID,
                text: message,
                badge: badge,
                autoClear: true,
                sticky: false,
                ongoing: false // seemingly not used anymore
            }
    );

Context

See above.

Debug logs

I haven't seen any exceptions. Log can be added if needed.

Steffaan commented 5 years ago

There is no difference between the two, regarding to the notification settings / workflow.

The whole notification code is unchanged, so I can't imagine the behaviour being different from the original plugin.

Still, because this version supports multiple channels, perhaps you created the channel earlier (by providing a notification) and it's configuration is different from your other notifications?

Try uninstalling your app (this will clear all existing channels) and trigger the notification again after reinstalling.

Don't just install a new version over the current one, you must uninstall your current app manually before installing again.

andersborgabiro commented 5 years ago

I uninstalled each time, but I noticed I've been using de.appplant.cordova.plugin.local-notification that works the way I need it to (non-sticky, one line). I'll see if cordova-plugin-local-notifications can be made to behave the same. Thanks.

andersborgabiro commented 5 years ago

The de.appplant.cordova.plugin.local-notification and cordova-plugin-local-notifications pages at NPM point to the same GitHub repository page, so that confused me. The released plugins behave differently though, and the prior the way I need.

In any case, I'll use your fork and try to set it to behave like the appplant plugin. The sticky behavior needs to go. I can cut the text string in my code if it can't be forced to be one line via the plugin.