Skip to content

Commit 52695d2

Browse files
Add Foreground/Background handlers for ToastActivation (#1973)
* Adding temp idl for base branch * Create .cpp/.h files for handling toastnotifications * Introduce ToastNotification Registration APIs (#1875) * Introduce ToastRegistration APIs and associated taef tests * Address comments * Address minor comments * Add support for Release x64 for ToastNotificationTestApp * Addressing nits * Add GetActivatorGuid function * Last nits * Update error messages Co-authored-by: Paul Purifoy <purifoypaul@microsoft.com> * Copy branch based on WNP_ToastNotifications * Address nit * Addressing nits * Address nits * Change name from ToastActivation->AppNotification * Change more constants * Reuse deserialize function Co-authored-by: Sharath Manchala <10109130+sharath2727@users.noreply.github.com>
1 parent eb6591e commit 52695d2

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

test/TestApps/ToastNotificationsTestApp/main.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,17 @@ winrt::ToastNotification GetToastNotification()
3535
return winrt::ToastNotification(xmlDocument);
3636
}
3737

38+
bool BackgroundActivationTest() // Activating application for background test.
39+
{
40+
return true;
41+
}
42+
43+
bool UnregisterBackgroundActivationTest()
44+
{
45+
winrt::ToastNotificationManager::Default().UnregisterActivator();
46+
return true;
47+
}
48+
3849
bool VerifyFailedRegisterActivatorUsingNullClsid()
3950
{
4051
try

test/TestApps/ToastNotificationsTestAppPackage/Package.appxmanifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
<com:Extension Category="windows.comServer">
5151
<com:ComServer>
5252
<com:ExeServer Executable="ToastNotificationsTestApp\ToastNotificationsTestApp.exe" DisplayName="SampleBackgroundApp" Arguments="----ToastActivated:">
53-
<com:Class Id="1940DBA9-0F64-4F0D-8A4B-5D207B812E61" DisplayName="Windows App Runtime Toast" />
53+
<com:Class Id="1940dba9-0f64-4f0d-8a4b-5d207b812e61" DisplayName="Windows App Runtime Toast" />
5454
</com:ExeServer>
5555
</com:ComServer>
5656
</com:Extension>

0 commit comments

Comments
 (0)