public async void Run(IBackgroundTaskInstance taskInstance) { Debug.WriteLine("===========background task run=============="); var defer = taskInstance.GetDeferral(); var result = await SimpleWallpaperSetter.DownloadAndSetAsync(URL); Debug.WriteLine($"===========result {result}=============="); defer.Complete(); }
public async void Run(IBackgroundTaskInstance taskInstance) { Debug.WriteLine("===========background task run=============="); var defer = taskInstance.GetDeferral(); var url = UnsplashImageFactory.CreateTodayHighlightImage().Urls.Full; var result = await SimpleWallpaperSetter.DownloadAndSetAsync(url); Debug.WriteLine($"===========result {result}=============="); defer.Complete(); }