Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Explain AsyncTaskLoader

I don't understand what all the functions in AsyncTaskLoader do, such as onCancelLoad() and onForceLoad(). All the functions and the order in which they're called are not documented properly.

Say I want to download a file in the background and cancel it if requested. What purpose does onCancelLoad() serve when there is already cancelLoadInBackground().

like image 369
Monstieur Avatar asked Oct 21 '22 16:10

Monstieur


1 Answers

This explains it perfectly. None of this vital information is explained in the documentation. Especially the most important aspect that it has three states that need to be handled carefully! No wonder so many apps malfunction when you rotate the screen.

like image 193
Monstieur Avatar answered Oct 31 '22 01:10

Monstieur