From the course: Developing UWP Apps: 9 Background Tasks

Unlock this course with a free trial

Join today to access over 22,400 courses taught by industry experts.

System triggers in action

System triggers in action

- [Instructor] Okay we're back over in Visual Studio 2017 to look at the concept of implementing both a timer trigger and a system event trigger in our tagur app. And just to review, we've added the appropriate references and then our package manifest. Take a look at that in the xml in our package manifest we have now added support for a background test for system event and timer in the entry point is tagur.Services.Background.listener. But remember we still need to register this background task. Something that we didn't take care of in the previous session. So to do this I created this background task helper class and let's take a look on what we've got in there. So I've got this RegisterListenerTaskAsync and I'm just passing it a minute increment. First thing I'm doing is calling the background execution manager to RequestAccessAsync. Now background test need to have permission to process on the background which only make sense we want to be good citizens and have the user know…

Contents