xan105 / node-powertoast

Windows toast notification and toastXml string builder

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sticky Notifications?

rbartholomay opened this issue · comments

Hi,

this is really nice! Is there a way t have "sticky" notifications when using buttons?

Bye, René

Hi René sorry but what do you mean by sticky notification ?

Currently there is longTime: true/false.
I´am searching for a way to have the notification displayed until the user will click on a button...

... found a way:

<toast scenario="reminder"

let template =<toast ${(options.timeStamp) ? displayTimestamp="${options.timeStamp}" :``}activationType="protocol" scenario="${options.scenario}" launch="${options.onClick}" duration="${options.longTime ? "Long" : "Short"}">;

seems to work...

Ah yes you are right from the Microsoft API:

The scenario adusts a few behaviors to create a consistent and unified user experience.

Reminder: The notification will stay on screen until the user dismisses it or takes action.
A reminder sound will be played.

When using Reminder or Alarm, you must provide at least one button on your toast notification. Otherwise, the toast will be treated as a normal toast.

I've added a scenario option like you suggested