You have to distinguish between the
BackgroundTask and the BackgroundTransfer. These
are two different things.
The job of your background task is to
start your background transfers.
The job of your BackgroundTransfer (upload or
download operation) is to perform the
transfer independently of your
The transfer doesn't need to take place within
the BackgroundTask. If you call await on
the start of the background transfer, you will
wait until the upload is complete. If you don't,
you will continue executing within your task (e.g.
if you are in a loop, you can begin to build and
start the next upload).
Once you have started a background transfer, it
is managed independently of your app or any task
by the OS. It can even survive the phone being