I've read the Microsoft Docs about backgrounding on mobile and have seen the various lifecycle states the app can be in. But I'm still a bit confused about the idea of a background Task in C# and the idea of backgrounding in iOS/Android.
Question:
Let's say I start a new background C# Task, in a ViewModel or Model class (exact pattern irrelevant). It receives data via a WebSocket as well as makes HTTP requests, and keeps running indefinitely. Does this task continue to run when the app is moved to the background by the user? If not, why, and what would I need to do to ensure it keeps running?