I've been reading on how to execute background tasks that communicate with the UI and I came across these two solutions. But I'm not decided on which one I should go with for the best option.
1. AsyncTask in a Fragment with setRetainInstance(true)
Following the guide in this page, this seems to take really good care of orientation changes and memory leaks.
2. AsyncTaskLoader is what google recommends, but there are some problems, like this, and documentation is also very sparse.
I'm actually more inclined to use option #1, but I don't know the full advantages/disadvantages compared to google's recommendation of #2.
Any input is appreciated.