Skip to content

Added WinAppSDK background task sample - #366

Closed
Godly T.Alias (godlytalias) wants to merge 2 commits into
microsoft:mainfrom
godlytalias:winmainbgtask
Closed

Added WinAppSDK background task sample#366
Godly T.Alias (godlytalias) wants to merge 2 commits into
microsoft:mainfrom
godlytalias:winmainbgtask

Conversation

@godlytalias

@godlytalias Godly T.Alias (godlytalias) commented Jul 25, 2024

Copy link
Copy Markdown
Contributor

Description

This sample application demonstrates how a WinUI3 app can register Background Task. In this sample usage of ToastNotificationHistoryChangedTrigger is demonstrated which can be easily changed to any supported triggers. On clicking the button on the UI, background task gets registered and a toast notification will get pushed, when user deletes this toast notification background task gets triggered and push another toast notification to notify that BackgroundTask have been triggered.

Target Release

1.5

Checklist

  • Samples build and run using the Visual Studio versions listed in the Windows development docs.
  • Samples build and run on all supported platforms (x64, x86, ARM64) and configurations (Debug, Release).
  • Samples set the minimum supported OS version to Windows 10 version 1809.
  • Samples build clean with no warnings or errors.
  • [For new samples]: Samples have completed the sample guidelines checklist and follow standardization/naming guidelines.
  • If I am onboarding a new feature, then I must have correctly setup a new CI pipeline for my feature with the correct triggers and path filters laid out in the "Onboarding Samples CI Pipeline for new feature" section in samples-guidelines.md.
  • I have commented on my PR /azp run SamplesCI-<FeatureName> to have the CI build run on my branch for each of my FeatureName my PR is modifying. This must be done on the latest commit on the PR before merging to ensure the build is up to date and accurate. Warning: the PR will not block automatically if this is not run due to '/azp run' limitation on triggering more than 10 pipelines.

Signed-off-by: Godly Alias <godlyalias@microsoft.com>
@godlytalias

Godly T.Alias (godlytalias) commented Jul 25, 2024

Copy link
Copy Markdown
Contributor Author

/azp run SamplesCI-BackgroundTask

@azure-pipelines

Copy link
Copy Markdown
Commenter does not have sufficient privileges for PR 366 in repo microsoft/WindowsAppSDK-Samples

1 similar comment
@azure-pipelines

Copy link
Copy Markdown
Commenter does not have sufficient privileges for PR 366 in repo microsoft/WindowsAppSDK-Samples

Signed-off-by: Godly Alias <godlyalias@microsoft.com>
@godlytalias

Copy link
Copy Markdown
Contributor Author

Sample as described in #333

@godlytalias Godly T.Alias (godlytalias) changed the title Added winmain background task sample Added WinAppSDK background task sample Jul 25, 2024

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the docs we need to add the appropriate copyright notice and license text to the headers.

For C#/C++ files (*h, *.cpp, *.cs, *.idl):

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

For XAML files (*.xaml):

<!-- Copyright (c) Microsoft Corporation.
 Licensed under the MIT License. -->

@Saharsh979

Copy link
Copy Markdown
Collaborator

/azp run SamplesCI-BackgroundTask

@azure-pipelines

Copy link
Copy Markdown
No pipelines are associated with this pull request.

@godlytalias

Copy link
Copy Markdown
Contributor Author

Samples added in #392

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants