Hello!
There is a fragment, at the touch of a button on which, AsyncTask launched and starts downloading data from the Internet. At the end of the download, this data is displayed in the RecyclerView this fragment.
As far as I understand, if in the process of AsyncTask operation the configuration of the device changes (for example, the screen orientation), then we will not receive the data from AsyncTask , since the fragment will be created anew.
Actually, the question is: how to be in such situations?
Ps. I read the Internet, there are a lot of ways, but the information is somehow hard to perceive and as a result porridge turns out in my head. Tell me, please, the most correct , from your point of view, method of solving this problem.
Thank!
Pps. It will be cool if someone AsyncTaskLoader an example using AsyncTaskLoader .
RxJava. Maybe it's time to try :) - s8am