Table of Contents

Interface INotificationManager

Namespace
Whim
Assembly
Whim.dll
The notification manager allows the sending of toast notifications to the user.
public interface INotificationManager : IDisposable
Inherited Members

Fields

NotificationIdKey

The key used to store the notification id in the notification arguments.
public const string NotificationIdKey = "WHIM_NOTIFICATION_ID"

Field Value

string

Methods

Initialize()

Initialize the notification manager.
void Initialize()

ProcessLaunchActivationArgs(AppNotificationActivatedEventArgs)

Handles a toast notification activation on app launch.
void ProcessLaunchActivationArgs(AppNotificationActivatedEventArgs args)

Parameters

args AppNotificationActivatedEventArgs

Register(string, Action<AppNotificationActivatedEventArgs>)

Register a notification handler for a given notification id.
void Register(string notificationId, Action<AppNotificationActivatedEventArgs> notificationReceived)

Parameters

notificationId string
The notification id to register the handler for.
The notificationid should be prefixed by the plugin name to prevent collisions.
notificationReceived Action<AppNotificationActivatedEventArgs>

SendToastNotification(AppNotification)

Send a toast notification to the user.
bool SendToastNotification(AppNotification appNotification)

Parameters

appNotification AppNotification
The notification to send.
Make sure to call SetArgument(INotificationManager.NOTIFICATION_ID_KEY, notificationId) to the notification and each component which can be interacted with.
Otherwise, the notification will not be handled.

Returns

bool

Unregister(string)

Unregister a notification handler for a given notification id.
void Unregister(string notificationId)

Parameters

notificationId string