![]() private void OnCompleted(IBackgroundTaskRegistration task, BackgroundTaskCompletedEventArgs args)Ĭreate an event handler function to handle background task progress Step 1Ĭreate an event handler function to handle completed background tasks. Windows::ApplicationModel::Background::BackgroundTaskCompletedEventArgs const& /* args */)Īuto completed = (BackgroundTaskRegistration^ task, BackgroundTaskCompletedEventArgs^ args)Īdd code to the event handler that deals with the background task completion.įor example, the background task sample updates the UI. Windows::ApplicationModel::Background::BackgroundTaskRegistration const& /* sender */, TODO: Add code that deals with background task completion. private void OnCompleted(IBackgroundTaskRegistration task, BackgroundTaskCompletedEventArgs args) Use the following footprint for the OnCompleted background task event handler method. ![]() ![]() This code needs to follow a specific footprint, which takes an IBackgroundTaskRegistration object and a BackgroundTaskCompletedEventArgs object. For more in-depth information on conditions and triggers, see Support your app with background tasks.Ĭreate an event handler to handle completed background tasks Step 1Ĭreate an event handler function to handle completed background tasks. To get started quickly building a background task, see Create and register an in-process background task or Create and register an out-of-process background task. This topic assumes that you have an app that registers background tasks.To do so, the app subscribes to events from the background task(s) it has registered with the system. (For in-process background tasks, you can set shared variables to signify progress and completion.)īackground task progress and completion can be monitored by app code. Learn how your app can recognize progress and completion reported by a background task that runs out-of-process.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |