I am a little confused with background tasks. I've finished making one with the help of this tutorial. The tutorial says this:
Create a background task class and register it to run when your app is not in the foreground
However, my background task runs even if it is in the foreground.
Is this intended behavior, that it runs whether or not the app is in the foreground? Is the presentation just not clear?
Background tasks run asynchronously on a thread pool thread, no matter what. Which means it doesn't matter whether your app is in the foreground or not. Once it kicks, its running.
Great links on BG tasks here - https://msdn.microsoft.com/en-us/windows/uwp/launch-resume/monitor-background-task-progress-and-completion .
Great paper on background tasks at https://www.microsoft.com/en-us/download/details.aspx?id=27411 . Still relevant even though its 8.1.