Skip to content

Latest commit

 

History

History
30 lines (23 loc) · 1.06 KB

windows-ui-notifications.md

File metadata and controls

30 lines (23 loc) · 1.06 KB
uid
Uno.Features.WinUINotifications

Badge Notifications

Tip

This article covers Uno-specific information for the Windows.UI.Notifications namespace. For a full description of the feature and instructions on using it, see Windows.UI.Notifications Namespace.

  • The Windows.UI.Notifications namespace provides classes for creating and managing badge notifications.

Badge notifications are supported on iOS and macOS.

macOS supports numeric and textual badges (as opposed to UWP) but does not support glyphs.

iOS allows for numeric badges only. It is also necessary to request user permission prior to executing the badge notification for the first time (this request can be executed when appropriate for your application):

#if __IOS__
UNUserNotificationCenter.Current
    .RequestAuthorization(
        UNAuthorizationOptions.Badge,
        (granted, error) => {
            if (granted)
            {
                //now setting badge is possible
            }
        });
#endif