From 5f3aab970c8abae06b26985633bace2e69b1bf97 Mon Sep 17 00:00:00 2001 From: Satwik Kumar Sharma Date: Wed, 23 Oct 2024 16:42:48 +0530 Subject: [PATCH 01/10] API Spec for Badge Notifications in WindowsAppSdk --- .../BadgeNotifications-spec.md | 192 ++++++++++++++++++ .../BadgeNotifications/GlyphBadgeExample.png | Bin 0 -> 3859 bytes .../NumericBadgeExample.png | Bin 0 -> 3404 bytes specs/BadgeNotifications/badge-activity.png | Bin 0 -> 2480 bytes specs/BadgeNotifications/badge-alarm.png | Bin 0 -> 1994 bytes specs/BadgeNotifications/badge-alert.png | Bin 0 -> 2290 bytes specs/BadgeNotifications/badge-attention.png | Bin 0 -> 1424 bytes specs/BadgeNotifications/badge-available.png | Bin 0 -> 2117 bytes specs/BadgeNotifications/badge-away.png | Bin 0 -> 2087 bytes specs/BadgeNotifications/badge-busy.png | Bin 0 -> 2108 bytes specs/BadgeNotifications/badge-error.png | Bin 0 -> 1734 bytes specs/BadgeNotifications/badge-newmessage.png | Bin 0 -> 1769 bytes specs/BadgeNotifications/badge-paused.png | Bin 0 -> 1382 bytes specs/BadgeNotifications/badge-playing.png | Bin 0 -> 2031 bytes .../BadgeNotifications/badge-unavailable.png | Bin 0 -> 2091 bytes 15 files changed, 192 insertions(+) create mode 100644 specs/BadgeNotifications/BadgeNotifications-spec.md create mode 100644 specs/BadgeNotifications/GlyphBadgeExample.png create mode 100644 specs/BadgeNotifications/NumericBadgeExample.png create mode 100644 specs/BadgeNotifications/badge-activity.png create mode 100644 specs/BadgeNotifications/badge-alarm.png create mode 100644 specs/BadgeNotifications/badge-alert.png create mode 100644 specs/BadgeNotifications/badge-attention.png create mode 100644 specs/BadgeNotifications/badge-available.png create mode 100644 specs/BadgeNotifications/badge-away.png create mode 100644 specs/BadgeNotifications/badge-busy.png create mode 100644 specs/BadgeNotifications/badge-error.png create mode 100644 specs/BadgeNotifications/badge-newmessage.png create mode 100644 specs/BadgeNotifications/badge-paused.png create mode 100644 specs/BadgeNotifications/badge-playing.png create mode 100644 specs/BadgeNotifications/badge-unavailable.png diff --git a/specs/BadgeNotifications/BadgeNotifications-spec.md b/specs/BadgeNotifications/BadgeNotifications-spec.md new file mode 100644 index 0000000000..0744391452 --- /dev/null +++ b/specs/BadgeNotifications/BadgeNotifications-spec.md @@ -0,0 +1,192 @@ +Badge Notifications in Windows App SDK +=== + +This is the spec for proposal: [Issue #138](https://github.com/microsoft/WindowsAppSDK/issues/138) + +# Background + +A notification badge conveys summary or status information specific to your app. They can be numeric (1-99) or one of a set of system-provided glyphs. Examples of information best conveyed through a badge include network connection status in an online game, user status in a messaging app, number of unread mails in a mail app, and number of new posts in a social media app. + +Example of a numeric badge in Taskbar (One new message in Whatsapp): + +![Screenshot](NumericBadgeExample.png) + +Example of a system-provided glyph in taskbar (New message in Outlook): + +![Screenshot](GlyphBadgeExample.png) + +This Badge notification functionality is missing in WinAppSDK, which not only blocks apps like WhatsApp to move to WinAppSDK but also stops them from availing new features and goodness that we are building in WinAppSDK. The scope of this document is to fill that gap and provide badge notification capability in WinAppSDK as well. + +# Description + +Badge notifications provide users with a visual indicator of new or important content in your application. This feature enhances user engagement by allowing them to quickly see updates without needing to open the app. Badge notifications are already supported for UWP apps. This initiative is to make badge notifications work in WindowsAppSdk. + +For more details see: + +- [Badge Notification WinRT APIs](https://learn.microsoft.com/en-us/windows/apps/design/shell/tiles-and-notifications/badges) + Defines all the API constructs that we have for Badge Notifications in WinRT today. + +# Examples + +## Create a numeric badge (c++) + + ```c++ +private void setBadgeNumber(uint32_t num) +{ + winrt::BadgeNotification badgeNotification(num); + winrt::BadgeNotificationManager manager = winrt::BadgeNotificationManager::Default(); + manager.UpdateBadge(badgeNotification); +} +``` + +## Create a Glyph badge (c++) + + ```c++ +private void updateBadgeGlyph() +{ + winrt::BadgeGlyphValue badgeGlyphValue = winrt::BadgeGlyphValue::alert + winrt::BadgeNotification badgeNotification(badgeGlyphValue); + winrt::BadgeNotificationManager manager = winrt::BadgeNotificationManager::Default(); + manager.UpdateBadge(badgeNotification); +} +``` + +## Clear a badge + + ```c++ +private void clearBadge() +{ + winrt::BadgeNotificationManager manager = winrt::BadgeNotificationManager::Default(); + manager.ClearBadge(); +} +``` + +## To set an expiration time in a badge (c++) + + ```c++ +private void updateBadgeGlyph() +{ + winrt::BadgeGlyphValue badgeGlyphValue = winrt::BadgeGlyphValue::alert + winrt::BadgeNotification badgeNotification(badgeGlyphValue); + + DateTime expirationTime = clock::now() + std::chrono::hours(24); + badgeNotification.Expiration(expirationTime); + + winrt::BadgeNotificationManager manager = winrt::BadgeNotificationManager::Default(); + manager.UpdateBadge(badgeNotification); +} +``` + +# API pages + +## BadgeNotification class + +The `BadgeNotification` class is used to create badge notifications for apps on platforms such as Windows, where badges can be displayed on the app's tile. A badge can show a numeric value or a system-provided glyph, providing a visual indicator of some status or count directly on the app's icon. + +## BadgeNotification constructors + +| Name | Description | +|-|-| +| BadgeNotification(UInt32) | Creates a new `BadgeNotification` object with a numeric badge value. This is used to display a specific number on the app's badge. | +| BadgeNotification(BadgeGlyphValue) | Creates a new `BadgeNotification` object with a glyph value. This uses a predefined glyph from the `BadgeGlyphValue` enum to display a system-provided symbol on the app's badge. | + +## BadgeNotification Properties +| Name | Description | Type | +|-|-|-| +| Expiration | Gets or sets the time after which the badge notification should no longer be displayed. This allows for the badge notification to be time-sensitive and automatically removed when it is no longer relevant. | Windows.Foundation.DateTime | + +## BadgeNotificationManager class + +The `BadgeNotificationManager` class is the central point for managing badge notifications for an application. It provides the functionality to update or clear the badge displayed on the app's tile. This class allows developers to modify the badge's appearance by setting a numeric value or a glyph and also to remove the badge when it is no longer needed. + +## BadgeNotificationManager Properties + +| Name | Description | Type | +|-|-|-| +| Default | Provides a default instance of the `BadgeNotificationManager` for use in updating or clearing badge notifications. | BadgeNotificationManager | + +## BadgeNotificationManager Methods + +| Name | Description | Parameters | Returns | +|-|-|-|-| +| UpdateBadge | Applies a change to the badge's glyph or number by providing a `BadgeNotification` object. This method is used to update the badge displayed on the app's tile to reflect a new status or count. | BadgeNotification `notification` | void | +| ClearBadge | Removes the badge notifications for the app from the action center. This method is useful for clearing any badge notifications when they are no longer relevant or when the app wants to reset its badge status. | | Windows.Foundation.IAsyncAction | + +## BadgeGlyphValue enum + +The `BadgeGlyphValue` enum defines a set of predefined glyphs that can be used to represent various statuses or notifications on an application's badge. These glyphs provide a visual cue on the app's tile, allowing users to quickly understand the app's status or to be alerted to new information without opening the app. + +| Name | Description | Glyph | +|-|-| +| None | No glyph is displayed. The badge will appear blank or not be shown at all. | (No Badge Shown) | +| Activity | A glyph indicating some form of activity is taking place within the app. | ![Screenshot](badge-activity.png) | +| Alert | A glyph that suggests an alert or an important notification that may require immediate attention. | ![Screenshot](badge-alert.png) | +| Alarm | A glyph that represents an alarm, possibly indicating a set reminder or a timed event. | ![Screenshot](badge-alarm.png) | +| Attention | A glyph that signifies the need for attention, often used for notifications or new information. | ![Screenshot](badge-attention.png) | +| Available | A glyph that indicates the user or a service is available, often used in communication apps. | ![Screenshot](badge-available.png) | +| Away | A glyph that shows the user is away or inactive, commonly used in status indicators for communication apps. | ![Screenshot](badge-away.png) | +| Busy | A glyph that represents the user being busy or engaged in an activity, preventing interruptions. | ![Screenshot](badge-busy.png) | +| NewMessage | A glyph that indicates the arrival of a new message, often used in messaging and email applications. | ![Screenshot](badge-newmessage.png) | +| Paused | A glyph that signifies a pause in activity or content, such as media playback being paused. | ![Screenshot](badge-paused.png) | +| Playing | A glyph that indicates media or content is currently playing. | ![Screenshot](badge-playing.png) | +| Unavailable | A glyph that shows the user or a service is not currently available or offline. | ![Screenshot](badge-unavailable.png) | +| Error | A glyph that denotes an error has occurred, which may require user action to resolve. | ![Screenshot](badge-error.png) | + +These glyphs are system-provided and standardized, ensuring a consistent look and feel across different applications that use them. By using these glyphs, developers can convey specific states or notifications to users in a visually intuitive manner. + +# API Details + +> Note: all of this new WinAppSDK API is to support + Badge Notifications in WindowsAppSdk + +```c++ (but really MIDL3) +namespace Microsoft.Windows.BadgeNotifications +{ + // Set of predefined glyphs that can be used to represent various statuses or notifications on an application's badge + enum BadgeGlyphValue + { + None, // No glyph. A blank tile appears in the badge. + Activity, // A glyph representing an activity + Alert, // A glyph representing an alert + Alarm, // A glyph representing an alarm + Attention, // A glyph representing attention + Available, // A glyph representing availability + Away, // A glyph representing being away + Busy, // A glyph representing being busy + NewMessage, // A glyph representing a new message + Paused, // A glyph representing being paused + Playing, // A glyph representing playing + Unavailable, // A glyph representing being unavailable + Error, // A glyph representing an error + }; + + runtimeclass BadgeNotification + { + // Constructs a BadgeNotification with a numeric badge value. + // This constructor initializes the BadgeNotification with a number that will be displayed on the badge. + // @param num The numeric value to be displayed on the badge. + BadgeNotification(UInt32 num); + + // Constructs a BadgeNotification with a glyph value. + // This constructor initializes the BadgeNotification with a predefined glyph from the BadgeGlyphValue enum. + // @param value The BadgeGlyphValue representing a system-provided glyph to be displayed on the badge. + BadgeNotification(BadgeGlyphValue value); + + // Gets or sets the time after which a Badge Notification should not be displayed. + Windows.Foundation.DateTime Expiration; + } + + // The manager class which encompasses all Badge Notification API Functionality + runtimeclass BadgeNotificationManager + { + // Gets a Default instance of a BadgeNotificationManager + static BadgeNotificationManager Default{ get; }; + + // Applies a change to the badge's glyph or number. + void UpdateBadge(BadgeNotification notification); + + // Removes the Badge Notifications for the App from Action Centre + Windows.Foundation.IAsyncAction ClearBadge(); + } +} +``` diff --git a/specs/BadgeNotifications/GlyphBadgeExample.png b/specs/BadgeNotifications/GlyphBadgeExample.png new file mode 100644 index 0000000000000000000000000000000000000000..1be995d9d104a9539adee75f0d30a999b1735878 GIT binary patch literal 3859 zcmV+u5A5)XP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D4yZ{)K~!i%rCNK8 zl+_hK^Vpf4U3O<*$}+$%6nr31p#n+EqF{VbsWJ9p)h0gvs5NbDZJIXKnpFFTO-yNH zO`B+&sHwEokkDd?rltZyn$& zn){BCY@}_l3>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*!buxqt8_YWg8!0q0SV4apWU?X={>x zv$UCJ@j-$kS_eT@4N4GQxi1a{BP7ouyxT?xDDa27YX=AbWNuW@26?d00M~aqU@+|d z2#75SN@W%gs*o$tresvE{alwoFF3X>84##J%BY4SAtOJozYt;gHl*EV(!utg57@Az zWKhJdmFuHzYD??|Kv}-W=|j~NVAR@i%@H|&qK>7%RsuO@7G)MZtp7UwG z>VQ7nE;djV{c!cj6$h@IS%nx5-}(p{hafO+vUWh^kl_P4|46WmV7Wrw=~$Zt4TxF! z6#%Qi-eqW;>jM%}f{s2~Akzdj^9N^|aEQpUt#bS`QJK2hGnB+b(1P#)=LR9f9+7KM zP9ITNS1u17J4U;9?Vz!-`oFw&bav93E7#HN9A0ywgLbl6VPRMoUm;Ntl(PJGV0n@6 zfD$2;&@qun(z(g-EljY7Tmqs*O%6zzn?=WockS9Ih8y0mx-=>IsO9lj-3%1_AW~e|H)?b2d6d32JCa(eTMJAvRgiKYNHnEl2Wfy1j(4m0wVz>jn#bP`4OSHhYP9f-k^H zAp^*5TS^|x0CJy*1!-~%3^Ies3_cknVg0pD2SDt)sm83C4fAh)&Awd*%%;k#^dCH? VYp-Z;9z*~D002ovPDHLkV1gxH7@Gh9 literal 0 HcmV?d00001 diff --git a/specs/BadgeNotifications/NumericBadgeExample.png b/specs/BadgeNotifications/NumericBadgeExample.png new file mode 100644 index 0000000000000000000000000000000000000000..3ba5660740e54e7e5af24c7b794846042ce150ba GIT binary patch literal 3404 zcmV-S4YTrzP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D4B<&cK~!i%otX=4 zSJfTIe=RNaL0`}oYDHkQf?A=NDTru96g0jcxcCYr+mf+mE-INZbCF~Zoe}m{mXK`X zmTfw55u8KVbQw=ITZ@456cH#CC@qB+EVMhHbMN=|{4XtT`;z1DcYg2RIp^O0xixFc zjw3zhkd>8XJv}|1c6WE%fB^&S%$YNmot>S`0X%k^17rYS?1Aj$tJs3(P<)_3`9rzv zh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ifications/badge-alert.png b/specs/BadgeNotifications/badge-alert.png new file mode 100644 index 0000000000000000000000000000000000000000..c38b09e4ca697980ec1a87c69c4eee9fe808e0db GIT binary patch literal 2290 zcmVPx-tVu*cRA>d&S_@E=RTSR;|96-7dr?A!5E2zpB6~<^3Q`!>s2N$4Hd9SCm7&%& z)KoJ)#+;_iM>Rbro$37)OU;UuM)5)UR#22Q0TFpEEaJvK{_T9fot>X$cVRI_{+Z?6 z$GPWz=iYPAz4u%M&HwN@91dar`#Yjfo;8i>v{*)1WjR@vHBokl90u`{AhwI5rbQ=; z)j@jwiNv9ym7hG8*(3;p<6^rP`YV7yi?f#h9$#ndnAmaNa=Sy;1p6XO5H;sQ0`)(| zMTG1uUO1(Ol#zXD&%8b>0N}YxH;u1rF)xs1M+6JH7%GZ_F)k`#RY}qG1HLNKX9Zv; zvsP^xajdTWDVt4>cLi)Ad+F@5*)2Ak!)A9l$c!9zyGAh)Nzw>pK7v*f1ie-(1o>$t zJ=vA346RnI85tM0vUoxEiN2awpA;x9E!8gkrLE9xv1h3}1!xl$p6jv_aM>q&)@wx} z*iR>g2IzYzLq%oFZwp^Bb?Q``x<7a6UKM!uP~!3qpw=@`JWQN0!+Z>Dyy3b!BwU|w{9_e8<>qU8vOuYaARV0 zZd&Y6bXanz{_Hp9C!1V5?=25cHJla(n-jd#{?}(NQ@hx18o|#qcnF8h_jlx{rN$0< zc*@8$$RT5J^hW{o4GhB~0{tKd*a+h~O8$jBKBo!MV2jwKE);7t@HUsj=D9yl6c~Vo z>wytiIqyv5EZLCGz8*=${mETi?~VgWdu{?&28Q~E-oTAJkYr# zW~W|t_5LL@XMFHrW@;#%EIoDXS`J>cL0ib+ddNl}oOh+b#%2V}z%Jq%$c$L*oOVYy z?yqf~@Z$Q7+o~FBxt=x~?IYPKBaqGIo+!@T zxJM}Uf~H9rTU5NnVzG}#!D-`ppAKxW*Oz8rJEHKmG2`h>uk4nPL+gs}3tgSjq5jG} zxykg;IYWqF5FG)W_Dx=;YsD{>2VPmb?}Syp;N#J@w-2XP-kJ4!>4;>=oLfLHGzbk_ z&yx*#pMY-i!CG2*#<*td@#=)AU~yDzSS0DBeCkm~8ii;~^5yT#PgULiW=YxleYMR# zbf@$UDKzVf=?Q}9(9*h9LLZ9o|L(8~rw@M`+RfI2cS`q7OpdNz^}xgoGM!j=&3FIR zT>sRkyY}v^Zt{A|a@Us2_@0eCuse?u%rMv}1q#G=o5rqeAc!8=Z5JX5z9 z@20V{Z%7y^i9MqYENeoNA$HqK`7vw%ICYF>;xJ~8>-tK8k$Hh#8aioirrqv{Mj>1j zUDLgKA#MzcMf~zz8A+c%e#_)*6Qg2a|0w50%_*L$=*^7+AijHO+yC*IX_M~Eh)*W3=Je-> z>)IOce{XAp#tri#;Tofjl~ z|4RcQvK#f+X?KZ;RdN#qojC1@j-xBm))%K|eYIdpPJ$uWxogrWcP{#@e0y3^@#fzu z>W!}LQHDD3fS2p9jt+@{EXagxF84&$7=c|xpp}_v%Do;3^3#V$?tb--{7ES>!?_J@ z@3s%OR2@uS^xekgKUdapxhD!9@S+XcG9P3@Hu~T)cT|lL*hM8uOo3J~Bix63sJn(J z`}JU*vA*rR(*2$;%meI`aNd;y8;2wj90qo* zDF>p&%*^)1c{Rn3S@h-ZJ;xhNEwh$wF3EZQ=bcCD+s$eoU(#p`8IT2;knL?(R$~KZ zU{@9&Lfn<-S_;rPVwG*=jy&B7zA8W2NWWiw0oohyy1g~c^z$kc8y2v!EMVSE8D%3w zd>$cgRAPz{t7OJ2g#r_s53m9=uqg`ARLF?WGgt&#l?pBxUc^TV+0Xls2x$kG51D!VhV8JiV2nZ(v|PU;{?ZgZA+G2%tW($@mrrxo`(Xpp}Ta z-6c4rh_?iU<2j literal 0 HcmV?d00001 diff --git a/specs/BadgeNotifications/badge-attention.png b/specs/BadgeNotifications/badge-attention.png new file mode 100644 index 0000000000000000000000000000000000000000..b5e33895187b7b8dd67dcf008293217a2fc52b4d GIT binary patch literal 1424 zcmV;B1#kL^P)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CTvy9z27Cfm#XKt zzN$(q%kEXyQ(`PS&}C29#5VO{0h9FM942oe>;R`qIhe8Pu)|7cmP-3-!;@e3%Nps@ z=p0?>G!r(lEp=c58)dM989D4gUg4cl6iA$HEAQM0N^Wprc1Oke;DbzqY)0yEexu7NUu^SsC$%R&#)}&4WsITP7A0BiJoHZ^P6F;N%XA zESC{vk{rycO40qb+cL437{MOi2ciony4o#BCoutgATrlLk;yp{Kd5B4WnwWgg582K z6JSsuB6EionVj?dgGzQ=CKeMT*e&Qj0S0d)G8b@>$+?Vho{x6I2DZ#(Vlgp--GZx> z&X7(b!ybrC&P|HTNVF3+?6)=(i-{5J7DTInf-w^r>I3#b%H-UnqMhtEzyKDpYhnbu z6=sPw(Mks{&|Djk;ccKkkR@>qe5~^jDK>eIZu?ae3}C?+*yNJ0@BAfT=aLhGB^ET$ zeImo#h%EWK%#|uWrlk~{EJr80?a9PoVgobS!}|afw+w`kTQ&!UJb%wCUxY*?ZK>_>QGj;nmJ(Fe{ObcQuLuO zW9%`HK5RUzZ6TAuU^3QVl&4R7WaFa1{kU0Ei#XA&$z2>EHEVjk%7v=0GtKq`hv`JK z{lp|rH0zIi;zYCl%qmW>#5UUx-Qol}wD!2AI|f0=3!`neH$>)a6ZO9u*n!~)6gSK^ v$i12z?f4BJuoMbb2gN5M-00000NkvXXu0mjfi97|^ literal 0 HcmV?d00001 diff --git a/specs/BadgeNotifications/badge-away.png b/specs/BadgeNotifications/badge-away.png new file mode 100644 index 0000000000000000000000000000000000000000..914bdb0402916f774edf5a005413f96eebe3981e GIT binary patch literal 2087 zcmV+?2-x?DP)Px+;Ymb6RA>d&nrUoQRTRhXdoxU1+Mz9!%2HZD76BDdFcDE%B!V#nR6^u~Ci+2) zvZ!bw~CKWL(H32}iCVl~L35KROHR6rJimQtV;T9~fWnK$0wD`#@&O^b9H zNKew&tAT@u&gR{Yp5=KPs~wSZINZ!swUVy z@LfS}@Yl7ACzWbroVN6rwrw^5;M0~Bk1jh~zrb-~x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/specs/BadgeNotifications/badge-error.png new file mode 100644 index 0000000000000000000000000000000000000000..c1e40c990fe6edb881bd17d456139fbee6e90a5f GIT binary patch literal 1734 zcmV;%208hOP)Px*fJsC_RA>d&nq6!ZRTO}C?rgV~vZbYfL>JJam|zrMhzdOLld2d^AcmOu;Dbiv zgZ#vx!NfGceXzvG%;{EI_?& zsbQsJ0}V?3)tpH5K6r1-#joC6f8DYyH>!E7S_K+f?Kt$^^7P>7Q==1^=UgW?Ka4I* z#m18J5+_q_$@9ndZtBy{IAN}rzM&leyz{`RHR*xLU5?|niJ~Y{DQhs*-gNZL{%t*B z9jVv>!eqzMu8u#`!@F}iXSp9ZqvK_KDwogXa&9i~x;l*9d_Lxdh;7F#9X?jvwyZ=v zZZ$W??Szgizm9lZ^{q-RIC5;)mflLkt0D)wySw9iPY>;x%;YzkMu8sDm19#`4eo@B z=R{mt^BWuNmZn6BGrH>Bp=VkTZ{EB)XW9!Y-`0V5KR=f|@kjp$=3Un}*u61&D?2)w z%~ut;1_{HEY-+FTc5(1~vILTtkzb+ExG z=g5Ks+B3yNN*Y;h{4tM#*SD;CeA}8-$G7{o*2D?m(S=TQ`<;LR7U6;sRyi*ewtjeG ztr*k0sXx zkqy$Dy^a44NE;FZQAVN~cGJFhpq$(bITK$?uOD>7!%fz*eT!^$9d!iGQ5RSPFfM%WeUJ~2SvM#^DiIe4}lQMMgH z3??J&id?01B1fKR@S>|4Ct#BBffZ)-c@F5IaLCV# z0TQiVgH+5&$sR~`luDp18@Srqa9h@l1hmyA;y}|Q+C{w(t1vt$)jTkpsLRuYK?M+mf9l7vm*b?_ge3z>qAP%k=G+yRYZ) zxnDlo{t2s(^ecoA6*TZ=#0;hTTAO9=$TfFFGAh%yr?)pS!Dhk(Qse*?eAeO1h|(Vy zIEQ{&dvjx@4>+!gdU$spn|PrQSYQhJds50fa^qUq|Nh761SM07*qoM6N<$f(yVPx*qe(d&nq6#EMHGPd-o4#g+S1akV4Aj4G%8x8Dkdr^o4Rv^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YUlGjD&E`m;%hib$>H`Z*$*!Cd zlbDM7XSQ5$q%;6yX7v@5jK-|KE?+0ReQpFNTR;a=1AcboqKLXuGvpKlxa00000 LNkvXXu0mjfaoASD literal 0 HcmV?d00001 diff --git a/specs/BadgeNotifications/badge-paused.png b/specs/BadgeNotifications/badge-paused.png new file mode 100644 index 0000000000000000000000000000000000000000..09c5b887bd6b914304716b661a6b8bf31a37605e GIT binary patch literal 1382 zcmV-s1)2JZP)Px)AW1|)RA>d&nonq4MI6WX&D(5@+ij9Yt4NGkq>3Q*s`g-%q7@N(5Il$=9xP~^ zf*?J36e)txSOh(YARYt{1t}IO7!O6yMGzIK7(>z8G=H}1n%#ZxIiDB4%jE4Y*-cD$ zHV}UE=gphXZ|3*rz4^`tx&PrWNs{2D55K$px4%{&tki1z>T!Hu9OovYBp&7VVPIB_ z$t?~U^J}qCxP0#&yMO%j=%arJL6B^>`(Ud#u+Zkn>2IeNmdcNm|EWEb#JOF)+$%7- z8>L$dUrmmezCU~7@pIwVX(X=Et8t#r$fouDQUv+?Zxd*6EZm4jvH@|I+?K}(G-cz*W6)DH{gQ*jiJ zsQ$Vg?&~&IwhONN$>PW!8(Vwqv^2{?Q+;T%bn=UtL-Q)j+KvtYf9dy?Sv6qP|6H!t zDmGSBwiC8!W9!Z_8$`}*9Jpt6rjrvb4-!y>4I?i=V*L+0>^lulfAm3L^r`+~fk}DS zw#)zz>}%(j-c!t{@Qal-=YGxh$!9OWpiKDUC!aTaRAC3ps6|fOz_!g^$|805L~&TF z70<*6hsWQ@KG+*(fTfbvM(~8qmF0>%7}@rG2$7BkTtCK(K5BmG;%TjIbN~+@{h8z}mz53ZG?!J$(=O47?eeL3GkZs0T{> zYF);4!OSXVf<^jJ+E?o`qV^f&KEa~fDDA6t8DTeQm4ZcdQrcJRGQw^US_O+@rnIlt zWrW?NDzOz>0cHb@V&*G6Y}(`_4#RHHAW?}0johcSZ`Ngl8TRx&fW$3Wv`Qae4luzc zPBEvf=<`V2R5C?qmAcRu3zNbJR+wQ+9k5doqt6Q#p*5{gL7y!wFbM-zn8`OeIb1;f zq7YpYp_Q}`f3Qd^g%MV9H66es4i{8`N{rB|e7`IVu3`;?y{X9*`GZYbR~R@AfOwo{t@gZ@?4tyR0Wdl0*pPI@*U?Yvtdb2kCj6CofIb#nxo_k>LtL;u}+B$%TgL1&p(E&Lzut!Xa zvw=S3lM@4d%ql04AP4rKTTWn+wK+>bj+dhC)^8=vx6O|K)F2CnBS_pR+la%`SF_i3 o%JV(nmmhny10uZo^>ds50Fp34;C{q)f&c&j07*qoM6N<$g71{2H~;_u literal 0 HcmV?d00001 diff --git a/specs/BadgeNotifications/badge-playing.png b/specs/BadgeNotifications/badge-playing.png new file mode 100644 index 0000000000000000000000000000000000000000..e2a3572d7568d4626ba7ea1a1093cfaee7b5e4b9 GIT binary patch literal 2031 zcmVPx+sYygZRA>d&T5D_+RTQ3?oh{UMX`w&?`;bRUYar0do5oNL4*?ZQRE);N6azsJ z5-DOpG{y%48Y(6Nfe?&|fC7r8P#`TarC>_I3YO9kun&P2w(WLzX}hoSezTlqx;xA6 zbazAAA3b-@+t@(<%4cEwLfjO*+$r1u2C)*m*A9KaS*TL z1(P6fM!g_hkBN%9F+8zf^$*LY-Q{^+3ROMdQvnRLuyEU%l*U%`RP%k?T*<}7YLUeY zoW<}&R8dlY!?`1?XVf!eTw2CcU(E&p_{>em$2A%|R=QkLe-ac56$HLDDIt3MsdX<@ zX*DEh1K=hLx0j5lZ8W{-aJW*u0o$0rSi2lfo5LYFoRY-cNOC$k*+q0Zj%V(}i#nc< z5=B0ykEn}ce&sDg6ovYhwRS)Q*6t}Y6kcooOgZapf~9-rPP@6o z?(C7{Dv;na7^3yMfrh?%_JKTj@HOU-9=u_5Ubb1$-KXgp;PZwtUMV=0a=FpG$>nrK z)B6@S-7U;lLIqCph{BKo%(n)x&*I_fgpRREhIK!$npsagZ|c_ofUl}E70>|8`kl58 zo0a(r@ghNEm~RbGTfd!c8 zSxJ2iK)}N1$!%otMkY`tNXs_P&CVDW=W#Ek;85Do)c~Cji~ts30yb~C-3-7|iPeSz z7H)H^%}R2-$8yut5|b}}{_?!dizlS1tcpJUwJ?C)ty_{;H(&xbU{uQKW&qZC%mDP#zsB3tCBe`qW=Gz%XA$J1 zhlC#FzyeGpA9)yk1s#}G@iS7JP4^d|jflP5-eC_WFZd)kb1cT-FKNYrLQ9v!JZ03N zK`cX%T_`0XHf~8y+Q_(Qy`$uxJ4VT!8o38({BLLR5X-g)oxpN%iHk0|+I+sIcwd|R z1?um$PbYcEZM4oljoo_eN?m&XuZ4w|8m=>*JO|+la$o{B(uFi0ZGn9X-r8lKLobk+ zQM)JfcAM4y;@77u78R77W@~vH$p}Y~E3wIE5QbgANs105aGyZSCIJdW4_DOPOMCy9 z6W^bzsbZgBo|I679N1`60%l+ra110c2zF|RgLX27%lDnDp7QbUMd1o^B}QNuaE2wY zIE+v`ob+N{izREr(KGo!Rg^P7?j+gR$^ZIN+fJ^;2Ewv*-!x7|4jKD6S zdO%=t45W6XX!jtum`G2sL9WCI>;j8hx%2@+bcQ9Nk)-Y*KXhDckSj3)yC;>1B-lvG zW`zR5zQUlW5iKzp(y*X)8GTW_b7>hvH!9Q=-F5i3ZvcFsm7^y$7 zi>R0}hHL;zA2u$saWFJKM!zd>>iGGY$s?Iw518vsX5+hi%PUS^xz$Pl)hI9$AJ|2d z`)r&u15DIy=w&46nt5YVKUy#@iDnZi4oXE)GDnH z5dCMU$ilfqzvl=`YsV55>Gio?Jzq6Rr(38#{gJ_%LRIYDlrPJ z^c;v{C!OQBz(~)a-3(xsNw^tNy3(-t7+QLjl9Hu(EC}kh5Y2K--u?VNKeiuxr~!g|J+7bI{13z+*5`ni?jQgF N002ovPDHLkV1joW$U*=B literal 0 HcmV?d00001 diff --git a/specs/BadgeNotifications/badge-unavailable.png b/specs/BadgeNotifications/badge-unavailable.png new file mode 100644 index 0000000000000000000000000000000000000000..9a3dcde3434e98ff0d8767db4997f8c7bb20f286 GIT bin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LdE|8rj z-rYuj|5|)3`CtGG?}AO-2+UwN2?Iqi_j%#Dm^tq@?DOMYoI1b&7SXF?1iMKLD~$vr z!gH$>9?BGRNR4+vhtoxMEILN8n*`tjibzU$HEs4)Sf05a40pmxpX));dmgeMFX9?F&YMir+n9gB_;?A&ne3lrc-eF#WmSmB}E=WkST z>e8|37{P9m?h|0-ZGO9vK7Zh;Z3f+A`F7V&XG8pslp$&hC< zW@&;yu*FW;58Yw}l(hD; zcXk$&j+czK-aZ Date: Wed, 23 Oct 2024 17:06:42 +0530 Subject: [PATCH 02/10] fixed typo --- specs/BadgeNotifications/BadgeNotifications-spec.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/BadgeNotifications/BadgeNotifications-spec.md b/specs/BadgeNotifications/BadgeNotifications-spec.md index 0744391452..f2b5ebbd11 100644 --- a/specs/BadgeNotifications/BadgeNotifications-spec.md +++ b/specs/BadgeNotifications/BadgeNotifications-spec.md @@ -117,7 +117,7 @@ The `BadgeNotificationManager` class is the central point for managing badge not The `BadgeGlyphValue` enum defines a set of predefined glyphs that can be used to represent various statuses or notifications on an application's badge. These glyphs provide a visual cue on the app's tile, allowing users to quickly understand the app's status or to be alerted to new information without opening the app. | Name | Description | Glyph | -|-|-| +|-|-|-| | None | No glyph is displayed. The badge will appear blank or not be shown at all. | (No Badge Shown) | | Activity | A glyph indicating some form of activity is taking place within the app. | ![Screenshot](badge-activity.png) | | Alert | A glyph that suggests an alert or an important notification that may require immediate attention. | ![Screenshot](badge-alert.png) | From 69a86ec1123a17fc65bd7d6c9fa08bf2468e7053 Mon Sep 17 00:00:00 2001 From: Satwik Kumar Sharma Date: Wed, 30 Oct 2024 12:50:07 +0530 Subject: [PATCH 03/10] resolved PR comments --- .../BadgeNotifications-spec.md | 53 ++++++++++--------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/specs/BadgeNotifications/BadgeNotifications-spec.md b/specs/BadgeNotifications/BadgeNotifications-spec.md index f2b5ebbd11..ca396334d4 100644 --- a/specs/BadgeNotifications/BadgeNotifications-spec.md +++ b/specs/BadgeNotifications/BadgeNotifications-spec.md @@ -34,8 +34,8 @@ For more details see: private void setBadgeNumber(uint32_t num) { winrt::BadgeNotification badgeNotification(num); - winrt::BadgeNotificationManager manager = winrt::BadgeNotificationManager::Default(); - manager.UpdateBadge(badgeNotification); + winrt::BadgeNotificationManager manager = winrt::BadgeNotificationManager::Current(); + manager.Update(badgeNotification); } ``` @@ -44,10 +44,10 @@ private void setBadgeNumber(uint32_t num) ```c++ private void updateBadgeGlyph() { - winrt::BadgeGlyphValue badgeGlyphValue = winrt::BadgeGlyphValue::alert - winrt::BadgeNotification badgeNotification(badgeGlyphValue); - winrt::BadgeNotificationManager manager = winrt::BadgeNotificationManager::Default(); - manager.UpdateBadge(badgeNotification); + winrt::BadgeNotificationGlyph badgeNotificationGlyph = winrt::BadgeNotificationGlyph::Alert + winrt::BadgeNotification badgeNotification(badgeNotificationGlyph); + winrt::BadgeNotificationManager manager = winrt::BadgeNotificationManager::Current(); + manager.Update(badgeNotification); } ``` @@ -56,8 +56,8 @@ private void updateBadgeGlyph() ```c++ private void clearBadge() { - winrt::BadgeNotificationManager manager = winrt::BadgeNotificationManager::Default(); - manager.ClearBadge(); + winrt::BadgeNotificationManager manager = winrt::BadgeNotificationManager::Current(); + manager.Clear(); } ``` @@ -66,18 +66,18 @@ private void clearBadge() ```c++ private void updateBadgeGlyph() { - winrt::BadgeGlyphValue badgeGlyphValue = winrt::BadgeGlyphValue::alert - winrt::BadgeNotification badgeNotification(badgeGlyphValue); + winrt::BadgeNotificationGlyph badgeNotificationGlyph = winrt::BadgeNotificationGlyph::Alert + winrt::BadgeNotification badgeNotification(badgeNotificationGlyph); DateTime expirationTime = clock::now() + std::chrono::hours(24); badgeNotification.Expiration(expirationTime); - winrt::BadgeNotificationManager manager = winrt::BadgeNotificationManager::Default(); - manager.UpdateBadge(badgeNotification); + winrt::BadgeNotificationManager manager = winrt::BadgeNotificationManager::Current(); + manager.Update(badgeNotification); } ``` -# API pages +# API Description ## BadgeNotification class @@ -88,7 +88,7 @@ The `BadgeNotification` class is used to create badge notifications for apps on | Name | Description | |-|-| | BadgeNotification(UInt32) | Creates a new `BadgeNotification` object with a numeric badge value. This is used to display a specific number on the app's badge. | -| BadgeNotification(BadgeGlyphValue) | Creates a new `BadgeNotification` object with a glyph value. This uses a predefined glyph from the `BadgeGlyphValue` enum to display a system-provided symbol on the app's badge. | +| BadgeNotification(BadgeNotificationGlyph) | Creates a new `BadgeNotification` object with a glyph value. This uses a predefined glyph from the `BadgeNotificationGlyph` enum to display a system-provided symbol on the app's badge. | ## BadgeNotification Properties | Name | Description | Type | @@ -109,12 +109,12 @@ The `BadgeNotificationManager` class is the central point for managing badge not | Name | Description | Parameters | Returns | |-|-|-|-| -| UpdateBadge | Applies a change to the badge's glyph or number by providing a `BadgeNotification` object. This method is used to update the badge displayed on the app's tile to reflect a new status or count. | BadgeNotification `notification` | void | -| ClearBadge | Removes the badge notifications for the app from the action center. This method is useful for clearing any badge notifications when they are no longer relevant or when the app wants to reset its badge status. | | Windows.Foundation.IAsyncAction | +| Update | Applies a change to the badge's glyph or number by providing a `BadgeNotification` object. This method is used to update the badge displayed on the app's tile to reflect a new status or count. | BadgeNotification `notification` | void | +| Clear | Removes the badge notifications for the app from the action center. This method is useful for clearing any badge notifications when they are no longer relevant or when the app wants to reset its badge status. | | Windows.Foundation.IAsyncAction | -## BadgeGlyphValue enum +## BadgeNotificationGlyph enum -The `BadgeGlyphValue` enum defines a set of predefined glyphs that can be used to represent various statuses or notifications on an application's badge. These glyphs provide a visual cue on the app's tile, allowing users to quickly understand the app's status or to be alerted to new information without opening the app. +The `BadgeNotificationGlyph` enum defines a set of predefined glyphs that can be used to represent various statuses or notifications on an application's badge. These glyphs provide a visual cue on the app's tile, allowing users to quickly understand the app's status or to be alerted to new information without opening the app. | Name | Description | Glyph | |-|-|-| @@ -133,6 +133,7 @@ The `BadgeGlyphValue` enum defines a set of predefined glyphs that can be used t | Error | A glyph that denotes an error has occurred, which may require user action to resolve. | ![Screenshot](badge-error.png) | These glyphs are system-provided and standardized, ensuring a consistent look and feel across different applications that use them. By using these glyphs, developers can convey specific states or notifications to users in a visually intuitive manner. +> Note: Only system-provided badge images can be used. # API Details @@ -143,7 +144,7 @@ These glyphs are system-provided and standardized, ensuring a consistent look an namespace Microsoft.Windows.BadgeNotifications { // Set of predefined glyphs that can be used to represent various statuses or notifications on an application's badge - enum BadgeGlyphValue + enum BadgeNotificationGlyph { None, // No glyph. A blank tile appears in the badge. Activity, // A glyph representing an activity @@ -165,12 +166,12 @@ namespace Microsoft.Windows.BadgeNotifications // Constructs a BadgeNotification with a numeric badge value. // This constructor initializes the BadgeNotification with a number that will be displayed on the badge. // @param num The numeric value to be displayed on the badge. - BadgeNotification(UInt32 num); + BadgeNotification(UInt32 notificationCount); // Constructs a BadgeNotification with a glyph value. - // This constructor initializes the BadgeNotification with a predefined glyph from the BadgeGlyphValue enum. - // @param value The BadgeGlyphValue representing a system-provided glyph to be displayed on the badge. - BadgeNotification(BadgeGlyphValue value); + // This constructor initializes the BadgeNotification with a predefined glyph from the BadgeNotificationGlyph enum. + // @param value The BadgeNotificationGlyph representing a system-provided glyph to be displayed on the badge. + BadgeNotification(BadgeNotificationGlyph value); // Gets or sets the time after which a Badge Notification should not be displayed. Windows.Foundation.DateTime Expiration; @@ -180,13 +181,13 @@ namespace Microsoft.Windows.BadgeNotifications runtimeclass BadgeNotificationManager { // Gets a Default instance of a BadgeNotificationManager - static BadgeNotificationManager Default{ get; }; + static BadgeNotificationManager Current{ get; }; // Applies a change to the badge's glyph or number. - void UpdateBadge(BadgeNotification notification); + void Update(BadgeNotification notification); // Removes the Badge Notifications for the App from Action Centre - Windows.Foundation.IAsyncAction ClearBadge(); + Windows.Foundation.IAsyncAction Clear(); } } ``` From 21a90fdcbdacf49623b880b0cc1c0b30b7cd1cc4 Mon Sep 17 00:00:00 2001 From: Jon Wiswall Date: Fri, 1 Nov 2024 10:51:03 -0700 Subject: [PATCH 04/10] Pretty-print markdown --- .../BadgeNotifications-spec.md | 144 ++++++++++-------- 1 file changed, 82 insertions(+), 62 deletions(-) diff --git a/specs/BadgeNotifications/BadgeNotifications-spec.md b/specs/BadgeNotifications/BadgeNotifications-spec.md index ca396334d4..02993bfc8d 100644 --- a/specs/BadgeNotifications/BadgeNotifications-spec.md +++ b/specs/BadgeNotifications/BadgeNotifications-spec.md @@ -1,25 +1,33 @@ -Badge Notifications in Windows App SDK -=== +# Badge Notifications in Windows App SDK This is the spec for proposal: [Issue #138](https://github.com/microsoft/WindowsAppSDK/issues/138) # Background -A notification badge conveys summary or status information specific to your app. They can be numeric (1-99) or one of a set of system-provided glyphs. Examples of information best conveyed through a badge include network connection status in an online game, user status in a messaging app, number of unread mails in a mail app, and number of new posts in a social media app. +A notification badge conveys summary or status information specific to your app. They can be numeric +(1-99) or one of a set of system-provided glyphs. Examples of information best conveyed through a +badge include network connection status in an online game, user status in a messaging app, number of +unread mails in a mail app, and number of new posts in a social media app. -Example of a numeric badge in Taskbar (One new message in Whatsapp): +Example of a numeric badge in Taskbar (One new message in Whatsapp): ![Screenshot](NumericBadgeExample.png) -Example of a system-provided glyph in taskbar (New message in Outlook): +Example of a system-provided glyph in taskbar (New message in Outlook): ![Screenshot](GlyphBadgeExample.png) - -This Badge notification functionality is missing in WinAppSDK, which not only blocks apps like WhatsApp to move to WinAppSDK but also stops them from availing new features and goodness that we are building in WinAppSDK. The scope of this document is to fill that gap and provide badge notification capability in WinAppSDK as well. + +This Badge notification functionality is missing in WinAppSDK, which not only blocks apps like +WhatsApp to move to WinAppSDK but also stops them from availing new features and goodness that we +are building in WinAppSDK. The scope of this document is to fill that gap and provide badge +notification capability in WinAppSDK as well. # Description -Badge notifications provide users with a visual indicator of new or important content in your application. This feature enhances user engagement by allowing them to quickly see updates without needing to open the app. Badge notifications are already supported for UWP apps. This initiative is to make badge notifications work in WindowsAppSdk. +Badge notifications provide users with a visual indicator of new or important content in your +application. This feature enhances user engagement by allowing them to quickly see updates without +needing to open the app. Badge notifications are already supported for UWP apps. This initiative is +to make badge notifications work in WindowsAppSdk. For more details see: @@ -30,50 +38,50 @@ For more details see: ## Create a numeric badge (c++) - ```c++ +```c++ private void setBadgeNumber(uint32_t num) { - winrt::BadgeNotification badgeNotification(num); - winrt::BadgeNotificationManager manager = winrt::BadgeNotificationManager::Current(); - manager.Update(badgeNotification); + winrt::BadgeNotification badgeNotification(num); + winrt::BadgeNotificationManager manager = winrt::BadgeNotificationManager::Current(); + manager.Update(badgeNotification); } ``` ## Create a Glyph badge (c++) - ```c++ +```c++ private void updateBadgeGlyph() { - winrt::BadgeNotificationGlyph badgeNotificationGlyph = winrt::BadgeNotificationGlyph::Alert - winrt::BadgeNotification badgeNotification(badgeNotificationGlyph); - winrt::BadgeNotificationManager manager = winrt::BadgeNotificationManager::Current(); - manager.Update(badgeNotification); + winrt::BadgeNotificationGlyph badgeNotificationGlyph = winrt::BadgeNotificationGlyph::Alert + winrt::BadgeNotification badgeNotification(badgeNotificationGlyph); + winrt::BadgeNotificationManager manager = winrt::BadgeNotificationManager::Current(); + manager.Update(badgeNotification); } ``` ## Clear a badge - ```c++ +```c++ private void clearBadge() { - winrt::BadgeNotificationManager manager = winrt::BadgeNotificationManager::Current(); - manager.Clear(); + winrt::BadgeNotificationManager manager = winrt::BadgeNotificationManager::Current(); + manager.Clear(); } ``` ## To set an expiration time in a badge (c++) - ```c++ +```c++ private void updateBadgeGlyph() { - winrt::BadgeNotificationGlyph badgeNotificationGlyph = winrt::BadgeNotificationGlyph::Alert - winrt::BadgeNotification badgeNotification(badgeNotificationGlyph); + winrt::BadgeNotificationGlyph badgeNotificationGlyph = winrt::BadgeNotificationGlyph::Alert + winrt::BadgeNotification badgeNotification(badgeNotificationGlyph); - DateTime expirationTime = clock::now() + std::chrono::hours(24); - badgeNotification.Expiration(expirationTime); + DateTime expirationTime = clock::now() + std::chrono::hours(24); + badgeNotification.Expiration(expirationTime); - winrt::BadgeNotificationManager manager = winrt::BadgeNotificationManager::Current(); - manager.Update(badgeNotification); + winrt::BadgeNotificationManager manager = winrt::BadgeNotificationManager::Current(); + manager.Update(badgeNotification); } ``` @@ -81,65 +89,77 @@ private void updateBadgeGlyph() ## BadgeNotification class -The `BadgeNotification` class is used to create badge notifications for apps on platforms such as Windows, where badges can be displayed on the app's tile. A badge can show a numeric value or a system-provided glyph, providing a visual indicator of some status or count directly on the app's icon. +The `BadgeNotification` class is used to create badge notifications for apps on platforms such as +Windows, where badges can be displayed on the app's tile. A badge can show a numeric value or a +system-provided glyph, providing a visual indicator of some status or count directly on the app's +icon. ## BadgeNotification constructors -| Name | Description | -|-|-| -| BadgeNotification(UInt32) | Creates a new `BadgeNotification` object with a numeric badge value. This is used to display a specific number on the app's badge. | +| Name | Description | +| ----------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| BadgeNotification(UInt32) | Creates a new `BadgeNotification` object with a numeric badge value. This is used to display a specific number on the app's badge. | | BadgeNotification(BadgeNotificationGlyph) | Creates a new `BadgeNotification` object with a glyph value. This uses a predefined glyph from the `BadgeNotificationGlyph` enum to display a system-provided symbol on the app's badge. | ## BadgeNotification Properties -| Name | Description | Type | -|-|-|-| + +| Name | Description | Type | +| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------- | | Expiration | Gets or sets the time after which the badge notification should no longer be displayed. This allows for the badge notification to be time-sensitive and automatically removed when it is no longer relevant. | Windows.Foundation.DateTime | ## BadgeNotificationManager class -The `BadgeNotificationManager` class is the central point for managing badge notifications for an application. It provides the functionality to update or clear the badge displayed on the app's tile. This class allows developers to modify the badge's appearance by setting a numeric value or a glyph and also to remove the badge when it is no longer needed. +The `BadgeNotificationManager` class is the central point for managing badge notifications for an +application. It provides the functionality to update or clear the badge displayed on the app's tile. +This class allows developers to modify the badge's appearance by setting a numeric value or a glyph +and also to remove the badge when it is no longer needed. ## BadgeNotificationManager Properties -| Name | Description | Type | -|-|-|-| +| Name | Description | Type | +| ------- | ------------------------------------------------------------------------------------------------------------------ | ------------------------ | | Default | Provides a default instance of the `BadgeNotificationManager` for use in updating or clearing badge notifications. | BadgeNotificationManager | ## BadgeNotificationManager Methods -| Name | Description | Parameters | Returns | -|-|-|-|-| -| Update | Applies a change to the badge's glyph or number by providing a `BadgeNotification` object. This method is used to update the badge displayed on the app's tile to reflect a new status or count. | BadgeNotification `notification` | void | -| Clear | Removes the badge notifications for the app from the action center. This method is useful for clearing any badge notifications when they are no longer relevant or when the app wants to reset its badge status. | | Windows.Foundation.IAsyncAction | +| Name | Description | Parameters | Returns | +| ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- | ------------------------------- | +| Update | Applies a change to the badge's glyph or number by providing a `BadgeNotification` object. This method is used to update the badge displayed on the app's tile to reflect a new status or count. | BadgeNotification `notification` | void | +| Clear | Removes the badge notifications for the app from the action center. This method is useful for clearing any badge notifications when they are no longer relevant or when the app wants to reset its badge status. | | Windows.Foundation.IAsyncAction | ## BadgeNotificationGlyph enum -The `BadgeNotificationGlyph` enum defines a set of predefined glyphs that can be used to represent various statuses or notifications on an application's badge. These glyphs provide a visual cue on the app's tile, allowing users to quickly understand the app's status or to be alerted to new information without opening the app. - -| Name | Description | Glyph | -|-|-|-| -| None | No glyph is displayed. The badge will appear blank or not be shown at all. | (No Badge Shown) | -| Activity | A glyph indicating some form of activity is taking place within the app. | ![Screenshot](badge-activity.png) | -| Alert | A glyph that suggests an alert or an important notification that may require immediate attention. | ![Screenshot](badge-alert.png) | -| Alarm | A glyph that represents an alarm, possibly indicating a set reminder or a timed event. | ![Screenshot](badge-alarm.png) | -| Attention | A glyph that signifies the need for attention, often used for notifications or new information. | ![Screenshot](badge-attention.png) | -| Available | A glyph that indicates the user or a service is available, often used in communication apps. | ![Screenshot](badge-available.png) | -| Away | A glyph that shows the user is away or inactive, commonly used in status indicators for communication apps. | ![Screenshot](badge-away.png) | -| Busy | A glyph that represents the user being busy or engaged in an activity, preventing interruptions. | ![Screenshot](badge-busy.png) | -| NewMessage | A glyph that indicates the arrival of a new message, often used in messaging and email applications. | ![Screenshot](badge-newmessage.png) | -| Paused | A glyph that signifies a pause in activity or content, such as media playback being paused. | ![Screenshot](badge-paused.png) | -| Playing | A glyph that indicates media or content is currently playing. | ![Screenshot](badge-playing.png) | -| Unavailable | A glyph that shows the user or a service is not currently available or offline. | ![Screenshot](badge-unavailable.png) | -| Error | A glyph that denotes an error has occurred, which may require user action to resolve. | ![Screenshot](badge-error.png) | - -These glyphs are system-provided and standardized, ensuring a consistent look and feel across different applications that use them. By using these glyphs, developers can convey specific states or notifications to users in a visually intuitive manner. +The `BadgeNotificationGlyph` enum defines a set of predefined glyphs that can be used to represent +various statuses or notifications on an application's badge. These glyphs provide a visual cue on +the app's tile, allowing users to quickly understand the app's status or to be alerted to new +information without opening the app. + +| Name | Description | Glyph | +| ----------- | ----------------------------------------------------------------------------------------------------------- | ------------------------------------ | +| None | No glyph is displayed. The badge will appear blank or not be shown at all. | (No Badge Shown) | +| Activity | A glyph indicating some form of activity is taking place within the app. | ![Screenshot](badge-activity.png) | +| Alert | A glyph that suggests an alert or an important notification that may require immediate attention. | ![Screenshot](badge-alert.png) | +| Alarm | A glyph that represents an alarm, possibly indicating a set reminder or a timed event. | ![Screenshot](badge-alarm.png) | +| Attention | A glyph that signifies the need for attention, often used for notifications or new information. | ![Screenshot](badge-attention.png) | +| Available | A glyph that indicates the user or a service is available, often used in communication apps. | ![Screenshot](badge-available.png) | +| Away | A glyph that shows the user is away or inactive, commonly used in status indicators for communication apps. | ![Screenshot](badge-away.png) | +| Busy | A glyph that represents the user being busy or engaged in an activity, preventing interruptions. | ![Screenshot](badge-busy.png) | +| NewMessage | A glyph that indicates the arrival of a new message, often used in messaging and email applications. | ![Screenshot](badge-newmessage.png) | +| Paused | A glyph that signifies a pause in activity or content, such as media playback being paused. | ![Screenshot](badge-paused.png) | +| Playing | A glyph that indicates media or content is currently playing. | ![Screenshot](badge-playing.png) | +| Unavailable | A glyph that shows the user or a service is not currently available or offline. | ![Screenshot](badge-unavailable.png) | +| Error | A glyph that denotes an error has occurred, which may require user action to resolve. | ![Screenshot](badge-error.png) | + +These glyphs are system-provided and standardized, ensuring a consistent look and feel across +different applications that use them. By using these glyphs, developers can convey specific states +or notifications to users in a visually intuitive manner. + > Note: Only system-provided badge images can be used. # API Details -> Note: all of this new WinAppSDK API is to support - Badge Notifications in WindowsAppSdk - +> Note: all of this new WinAppSDK API is to support Badge Notifications in WindowsAppSdk + ```c++ (but really MIDL3) namespace Microsoft.Windows.BadgeNotifications { From 73f49aa09c03623c728c0bddc2e92d220e6b8961 Mon Sep 17 00:00:00 2001 From: Satwik Kumar Sharma Date: Mon, 4 Nov 2024 12:10:42 +0530 Subject: [PATCH 05/10] resolved PR comments and added compatibility section in the spec --- .../BadgeNotifications/BadgeNotifications-spec.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/specs/BadgeNotifications/BadgeNotifications-spec.md b/specs/BadgeNotifications/BadgeNotifications-spec.md index 02993bfc8d..186cf46f46 100644 --- a/specs/BadgeNotifications/BadgeNotifications-spec.md +++ b/specs/BadgeNotifications/BadgeNotifications-spec.md @@ -34,6 +34,15 @@ For more details see: - [Badge Notification WinRT APIs](https://learn.microsoft.com/en-us/windows/apps/design/shell/tiles-and-notifications/badges) Defines all the API constructs that we have for Badge Notifications in WinRT today. +# Compatibility +### Supported Platforms +This API is exclusively available for packaged apps. It is not supported for web apps or other +types of applications. +### Notification Type +The badge notifications are local to the device. No remote server interaction is required or +supported for updating the badge count. + + # Examples ## Create a numeric badge (c++) @@ -118,7 +127,7 @@ and also to remove the badge when it is no longer needed. | Name | Description | Type | | ------- | ------------------------------------------------------------------------------------------------------------------ | ------------------------ | -| Default | Provides a default instance of the `BadgeNotificationManager` for use in updating or clearing badge notifications. | BadgeNotificationManager | +| Current | Provides a default instance of the `BadgeNotificationManager` for use in updating or clearing badge notifications. | BadgeNotificationManager | ## BadgeNotificationManager Methods @@ -138,17 +147,17 @@ information without opening the app. | ----------- | ----------------------------------------------------------------------------------------------------------- | ------------------------------------ | | None | No glyph is displayed. The badge will appear blank or not be shown at all. | (No Badge Shown) | | Activity | A glyph indicating some form of activity is taking place within the app. | ![Screenshot](badge-activity.png) | -| Alert | A glyph that suggests an alert or an important notification that may require immediate attention. | ![Screenshot](badge-alert.png) | | Alarm | A glyph that represents an alarm, possibly indicating a set reminder or a timed event. | ![Screenshot](badge-alarm.png) | +| Alert | A glyph that suggests an alert or an important notification that may require immediate attention. | ![Screenshot](badge-alert.png) | | Attention | A glyph that signifies the need for attention, often used for notifications or new information. | ![Screenshot](badge-attention.png) | | Available | A glyph that indicates the user or a service is available, often used in communication apps. | ![Screenshot](badge-available.png) | | Away | A glyph that shows the user is away or inactive, commonly used in status indicators for communication apps. | ![Screenshot](badge-away.png) | | Busy | A glyph that represents the user being busy or engaged in an activity, preventing interruptions. | ![Screenshot](badge-busy.png) | +| Error | A glyph that denotes an error has occurred, which may require user action to resolve. | ![Screenshot](badge-error.png) | | NewMessage | A glyph that indicates the arrival of a new message, often used in messaging and email applications. | ![Screenshot](badge-newmessage.png) | | Paused | A glyph that signifies a pause in activity or content, such as media playback being paused. | ![Screenshot](badge-paused.png) | | Playing | A glyph that indicates media or content is currently playing. | ![Screenshot](badge-playing.png) | | Unavailable | A glyph that shows the user or a service is not currently available or offline. | ![Screenshot](badge-unavailable.png) | -| Error | A glyph that denotes an error has occurred, which may require user action to resolve. | ![Screenshot](badge-error.png) | These glyphs are system-provided and standardized, ensuring a consistent look and feel across different applications that use them. By using these glyphs, developers can convey specific states From 60c88f5900d50fbf461a5be2ed5a4d791ad81b7d Mon Sep 17 00:00:00 2001 From: Satwik Kumar Sharma Date: Tue, 5 Nov 2024 16:30:03 +0530 Subject: [PATCH 06/10] resolved API spec review comments --- .../BadgeNotifications-spec.md | 84 +++++++------------ 1 file changed, 30 insertions(+), 54 deletions(-) diff --git a/specs/BadgeNotifications/BadgeNotifications-spec.md b/specs/BadgeNotifications/BadgeNotifications-spec.md index 186cf46f46..800981cb45 100644 --- a/specs/BadgeNotifications/BadgeNotifications-spec.md +++ b/specs/BadgeNotifications/BadgeNotifications-spec.md @@ -21,6 +21,8 @@ This Badge notification functionality is missing in WinAppSDK, which not only bl WhatsApp to move to WinAppSDK but also stops them from availing new features and goodness that we are building in WinAppSDK. The scope of this document is to fill that gap and provide badge notification capability in WinAppSDK as well. +> Note: This provids a subset of functionality present in WindowsSdk, but all that is necessary +to post and clear a badge notification # Description @@ -50,9 +52,8 @@ supported for updating the badge count. ```c++ private void setBadgeNumber(uint32_t num) { - winrt::BadgeNotification badgeNotification(num); winrt::BadgeNotificationManager manager = winrt::BadgeNotificationManager::Current(); - manager.Update(badgeNotification); + manager.SetBadgeAsCount(num); } ``` @@ -61,10 +62,9 @@ private void setBadgeNumber(uint32_t num) ```c++ private void updateBadgeGlyph() { - winrt::BadgeNotificationGlyph badgeNotificationGlyph = winrt::BadgeNotificationGlyph::Alert - winrt::BadgeNotification badgeNotification(badgeNotificationGlyph); + winrt::BadgeNotificationGlyph badgeNotificationGlyph = winrt::BadgeNotificationGlyph::Alert; winrt::BadgeNotificationManager manager = winrt::BadgeNotificationManager::Current(); - manager.Update(badgeNotification); + manager.SetBadgeAsGlyph(badgeNotificationGlyph); } ``` @@ -74,7 +74,7 @@ private void updateBadgeGlyph() private void clearBadge() { winrt::BadgeNotificationManager manager = winrt::BadgeNotificationManager::Current(); - manager.Clear(); + manager.ClearBadge(); } ``` @@ -84,38 +84,16 @@ private void clearBadge() private void updateBadgeGlyph() { winrt::BadgeNotificationGlyph badgeNotificationGlyph = winrt::BadgeNotificationGlyph::Alert - winrt::BadgeNotification badgeNotification(badgeNotificationGlyph); DateTime expirationTime = clock::now() + std::chrono::hours(24); - badgeNotification.Expiration(expirationTime); winrt::BadgeNotificationManager manager = winrt::BadgeNotificationManager::Current(); - manager.Update(badgeNotification); + manager.SetBadgeAsGlyph(badgeNotificationGlyph, expirationTime); } ``` # API Description -## BadgeNotification class - -The `BadgeNotification` class is used to create badge notifications for apps on platforms such as -Windows, where badges can be displayed on the app's tile. A badge can show a numeric value or a -system-provided glyph, providing a visual indicator of some status or count directly on the app's -icon. - -## BadgeNotification constructors - -| Name | Description | -| ----------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| BadgeNotification(UInt32) | Creates a new `BadgeNotification` object with a numeric badge value. This is used to display a specific number on the app's badge. | -| BadgeNotification(BadgeNotificationGlyph) | Creates a new `BadgeNotification` object with a glyph value. This uses a predefined glyph from the `BadgeNotificationGlyph` enum to display a system-provided symbol on the app's badge. | - -## BadgeNotification Properties - -| Name | Description | Type | -| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------- | -| Expiration | Gets or sets the time after which the badge notification should no longer be displayed. This allows for the badge notification to be time-sensitive and automatically removed when it is no longer relevant. | Windows.Foundation.DateTime | - ## BadgeNotificationManager class The `BadgeNotificationManager` class is the central point for managing badge notifications for an @@ -131,10 +109,15 @@ and also to remove the badge when it is no longer needed. ## BadgeNotificationManager Methods -| Name | Description | Parameters | Returns | -| ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- | ------------------------------- | -| Update | Applies a change to the badge's glyph or number by providing a `BadgeNotification` object. This method is used to update the badge displayed on the app's tile to reflect a new status or count. | BadgeNotification `notification` | void | -| Clear | Removes the badge notifications for the app from the action center. This method is useful for clearing any badge notifications when they are no longer relevant or when the app wants to reset its badge status. | | Windows.Foundation.IAsyncAction | +| Name | Description | Parameters | Returns | +| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ | ------- | +| SetBadgeAsCount | Updates the badge on the app's tile to display a numeric value. This method is used to reflect a new status or count. | UInt32 `notificationCount` | void | +| SetBadgeAsCount | Updates the badge on the app's tile to display a numeric value, with an expiration time after which the badge should be cleared. | UInt32 `notificationCount`, Windows.Foundation.DateTime `expiration` | void | +| SetBadgeAsGlyph | Updates the badge on the app's tile to display a glyph. This method is used to reflect a new status represented by a glyph. | BadgeNotificationGlyph `glyphValue` | void | +| SetBadgeAsGlyph | Updates the badge on the app's tile to display a glyph, with an expiration time after which the badge should be cleared. | BadgeNotificationGlyph `glyphValue`, Windows.Foundation.DateTime `expiration` | void | +| ClearBadge | Removes the badge notifications for the app from the action center. This method is useful for clearing any badge notifications when they are no longer relevant or when the app wants to reset its badge status. | | void | + +> Note: For Numeric badge if the count is greater then 99 it will be reported as "99+" ## BadgeNotificationGlyph enum @@ -177,46 +160,39 @@ namespace Microsoft.Windows.BadgeNotifications { None, // No glyph. A blank tile appears in the badge. Activity, // A glyph representing an activity - Alert, // A glyph representing an alert Alarm, // A glyph representing an alarm + Alert, // A glyph representing an alert Attention, // A glyph representing attention Available, // A glyph representing availability Away, // A glyph representing being away Busy, // A glyph representing being busy + Error, // A glyph representing an error NewMessage, // A glyph representing a new message Paused, // A glyph representing being paused Playing, // A glyph representing playing Unavailable, // A glyph representing being unavailable - Error, // A glyph representing an error }; - runtimeclass BadgeNotification - { - // Constructs a BadgeNotification with a numeric badge value. - // This constructor initializes the BadgeNotification with a number that will be displayed on the badge. - // @param num The numeric value to be displayed on the badge. - BadgeNotification(UInt32 notificationCount); - - // Constructs a BadgeNotification with a glyph value. - // This constructor initializes the BadgeNotification with a predefined glyph from the BadgeNotificationGlyph enum. - // @param value The BadgeNotificationGlyph representing a system-provided glyph to be displayed on the badge. - BadgeNotification(BadgeNotificationGlyph value); - - // Gets or sets the time after which a Badge Notification should not be displayed. - Windows.Foundation.DateTime Expiration; - } - // The manager class which encompasses all Badge Notification API Functionality runtimeclass BadgeNotificationManager { // Gets a Default instance of a BadgeNotificationManager static BadgeNotificationManager Current{ get; }; - // Applies a change to the badge's glyph or number. - void Update(BadgeNotification notification); + // Updates the badge on the app's tile to display a numeric value. + void SetBadgeAsCount(UInt32 notificationCount); + + // Updates the badge on the app's tile to display a numeric value with an expiration time. + void SetBadgeAsCount(UInt32 notificationCount, Windows.Foundation.DateTime expiration); + + // Updates the badge on the app's tile to display a glyph. + void SetBadgeAsGlyph(BadgeNotificationGlyph glyphValue); + + // Updates the badge on the app's tile to display a glyph with an expiration time. + void SetBadgeAsGlyph(BadgeNotificationGlyph glyphValue, Windows.Foundation.DateTime expiration); // Removes the Badge Notifications for the App from Action Centre - Windows.Foundation.IAsyncAction Clear(); + void ClearBadge(); } } ``` From b49bb05316f6a290b57857f1e6cd41c0b43bed9a Mon Sep 17 00:00:00 2001 From: Satwik Kumar Sharma Date: Tue, 5 Nov 2024 16:41:12 +0530 Subject: [PATCH 07/10] resolved nit comment --- specs/BadgeNotifications/BadgeNotifications-spec.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/BadgeNotifications/BadgeNotifications-spec.md b/specs/BadgeNotifications/BadgeNotifications-spec.md index 800981cb45..e0e3ff41d9 100644 --- a/specs/BadgeNotifications/BadgeNotifications-spec.md +++ b/specs/BadgeNotifications/BadgeNotifications-spec.md @@ -191,7 +191,7 @@ namespace Microsoft.Windows.BadgeNotifications // Updates the badge on the app's tile to display a glyph with an expiration time. void SetBadgeAsGlyph(BadgeNotificationGlyph glyphValue, Windows.Foundation.DateTime expiration); - // Removes the Badge Notifications for the App from Action Centre + // Removes the Badge Notifications for the App from Action Center void ClearBadge(); } } From 19abc54c532c912d542062a5c87004a5008081d8 Mon Sep 17 00:00:00 2001 From: Satwik Kumar Sharma Date: Wed, 27 Nov 2024 16:22:02 +0530 Subject: [PATCH 08/10] Added clarification for None Glyph Type --- specs/BadgeNotifications/BadgeNotifications-spec.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/BadgeNotifications/BadgeNotifications-spec.md b/specs/BadgeNotifications/BadgeNotifications-spec.md index e0e3ff41d9..75b4f9b06a 100644 --- a/specs/BadgeNotifications/BadgeNotifications-spec.md +++ b/specs/BadgeNotifications/BadgeNotifications-spec.md @@ -128,7 +128,7 @@ information without opening the app. | Name | Description | Glyph | | ----------- | ----------------------------------------------------------------------------------------------------------- | ------------------------------------ | -| None | No glyph is displayed. The badge will appear blank or not be shown at all. | (No Badge Shown) | +| None | No glyph is displayed. The badge will not be shown at all. It is equivalent to ClearBadge. | (No Badge Shown) | | Activity | A glyph indicating some form of activity is taking place within the app. | ![Screenshot](badge-activity.png) | | Alarm | A glyph that represents an alarm, possibly indicating a set reminder or a timed event. | ![Screenshot](badge-alarm.png) | | Alert | A glyph that suggests an alert or an important notification that may require immediate attention. | ![Screenshot](badge-alert.png) | From dd48346801290d05ceb287a9ae9352077a2a3b3c Mon Sep 17 00:00:00 2001 From: Jon Wiswall Date: Mon, 2 Dec 2024 09:45:53 -0800 Subject: [PATCH 09/10] Formatting pass, packaging note --- .../BadgeNotifications-spec.md | 38 +++++++++++-------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/specs/BadgeNotifications/BadgeNotifications-spec.md b/specs/BadgeNotifications/BadgeNotifications-spec.md index 75b4f9b06a..7cde219f58 100644 --- a/specs/BadgeNotifications/BadgeNotifications-spec.md +++ b/specs/BadgeNotifications/BadgeNotifications-spec.md @@ -21,8 +21,9 @@ This Badge notification functionality is missing in WinAppSDK, which not only bl WhatsApp to move to WinAppSDK but also stops them from availing new features and goodness that we are building in WinAppSDK. The scope of this document is to fill that gap and provide badge notification capability in WinAppSDK as well. -> Note: This provids a subset of functionality present in WindowsSdk, but all that is necessary -to post and clear a badge notification + +> Note: This provids a subset of functionality present in WindowsSdk, but all that is necessary to +> post and clear a badge notification # Description @@ -33,17 +34,22 @@ to make badge notifications work in WindowsAppSdk. For more details see: -- [Badge Notification WinRT APIs](https://learn.microsoft.com/en-us/windows/apps/design/shell/tiles-and-notifications/badges) +- [Badge Notification WinRT APIs](https://learn.microsoft.com/windows/apps/design/shell/tiles-and-notifications/badges) Defines all the API constructs that we have for Badge Notifications in WinRT today. # Compatibility -### Supported Platforms -This API is exclusively available for packaged apps. It is not supported for web apps or other -types of applications. -### Notification Type -The badge notifications are local to the device. No remote server interaction is required or -supported for updating the badge count. +## Supported Apps + +This API requires package identity to match notifications to applications. See +[an overview of package identity](https://learn.microsoft.com/windows/apps/desktop/modernize/package-identity-overview) +for how to deploy your application as a package, or assign identity to your existing application +during its install time. + +## Notification Type + +The badge notifications are local to the device. No remote server interaction is required or +supported for updating the badge count. # Examples @@ -109,13 +115,13 @@ and also to remove the badge when it is no longer needed. ## BadgeNotificationManager Methods -| Name | Description | Parameters | Returns | -| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ | ------- | -| SetBadgeAsCount | Updates the badge on the app's tile to display a numeric value. This method is used to reflect a new status or count. | UInt32 `notificationCount` | void | -| SetBadgeAsCount | Updates the badge on the app's tile to display a numeric value, with an expiration time after which the badge should be cleared. | UInt32 `notificationCount`, Windows.Foundation.DateTime `expiration` | void | -| SetBadgeAsGlyph | Updates the badge on the app's tile to display a glyph. This method is used to reflect a new status represented by a glyph. | BadgeNotificationGlyph `glyphValue` | void | -| SetBadgeAsGlyph | Updates the badge on the app's tile to display a glyph, with an expiration time after which the badge should be cleared. | BadgeNotificationGlyph `glyphValue`, Windows.Foundation.DateTime `expiration` | void | -| ClearBadge | Removes the badge notifications for the app from the action center. This method is useful for clearing any badge notifications when they are no longer relevant or when the app wants to reset its badge status. | | void | +| Name | Description | Parameters | Returns | +| --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ------- | +| SetBadgeAsCount | Updates the badge on the app's tile to display a numeric value. This method is used to reflect a new status or count. | UInt32 `notificationCount` | void | +| SetBadgeAsCount | Updates the badge on the app's tile to display a numeric value, with an expiration time after which the badge should be cleared. | UInt32 `notificationCount`, Windows.Foundation.DateTime `expiration` | void | +| SetBadgeAsGlyph | Updates the badge on the app's tile to display a glyph. This method is used to reflect a new status represented by a glyph. | BadgeNotificationGlyph `glyphValue` | void | +| SetBadgeAsGlyph | Updates the badge on the app's tile to display a glyph, with an expiration time after which the badge should be cleared. | BadgeNotificationGlyph `glyphValue`, Windows.Foundation.DateTime `expiration` | void | +| ClearBadge | Removes the badge notifications for the app from the action center. This method is useful for clearing any badge notifications when they are no longer relevant or when the app wants to reset its badge status. | | void | > Note: For Numeric badge if the count is greater then 99 it will be reported as "99+" From 02da576f95ab49a42a78a16b4715ccfd502b2905 Mon Sep 17 00:00:00 2001 From: SatwikKrSharma <68874478+SatwikKrSharma@users.noreply.github.com> Date: Mon, 9 Dec 2024 11:31:12 +0530 Subject: [PATCH 10/10] Update BadgeNotifications-spec.md --- specs/BadgeNotifications/BadgeNotifications-spec.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/specs/BadgeNotifications/BadgeNotifications-spec.md b/specs/BadgeNotifications/BadgeNotifications-spec.md index 7cde219f58..2dda23090e 100644 --- a/specs/BadgeNotifications/BadgeNotifications-spec.md +++ b/specs/BadgeNotifications/BadgeNotifications-spec.md @@ -185,16 +185,16 @@ namespace Microsoft.Windows.BadgeNotifications // Gets a Default instance of a BadgeNotificationManager static BadgeNotificationManager Current{ get; }; - // Updates the badge on the app's tile to display a numeric value. + // Updates the badge on the app's icon on taskbar to display a numeric value. void SetBadgeAsCount(UInt32 notificationCount); - // Updates the badge on the app's tile to display a numeric value with an expiration time. + // Updates the badge on the app's icon on taskbar to display a numeric value with an expiration time. void SetBadgeAsCount(UInt32 notificationCount, Windows.Foundation.DateTime expiration); - // Updates the badge on the app's tile to display a glyph. + // Updates the badge on the app's icon on taskbar to display a glyph. void SetBadgeAsGlyph(BadgeNotificationGlyph glyphValue); - // Updates the badge on the app's tile to display a glyph with an expiration time. + // Updates the badge on the app's icon on taskbar to display a glyph with an expiration time. void SetBadgeAsGlyph(BadgeNotificationGlyph glyphValue, Windows.Foundation.DateTime expiration); // Removes the Badge Notifications for the App from Action Center