I want to use a background task for my UWP app.
The below code, is my back button click event in windows mobile-
private async void MainPage_BackRequeste
ExtendedExecution will allow you to keep running and finish your task before you get suspended. Please take a look at the official sample for ExtendedExecution