I have a ListFragment, currently populated with static data, fixed at compile time. I actually want the data for the list to be screenscraped from the web.
I plan to use jsoup to do the retrieval and parsing etc. But what’s the best way to link jsoup to the ListFragment?
Should I be using a Loader such as AsyncTaskLoader? I wasn’t sure because the API docs say that loaders should “monitor the source of their data and deliver new results when the contents change”, but retrieving the data for my ListFragment will be a one-time operation: there will be no need to monitor the source.
Any advice would be gratefully received.
I had the same problem, to solve it i had to extend AsyncTaskLoader and works OK.
On the
public List loadInBackground() i’m downloading the data and that’s all.
I recommend’s that check the support v4 samplesandroid/support/v4/samples/Support4Demos/src/com/example/android/supportv4/app/LoaderCustomSupport.java