Unfortunately, according to the documentation, you need to use a file to do background loading.
In the "Background Transfer Matters" section:
Only downloads of tasks from a file are supported (loading from data objects or a flow failure after the program exits).
(In addition, there is no guarantee when and why your application will be terminated. Trying to avoid blocking the device will not be enough, there are many other ways in which your application may be terminated.)
source share