In my application, I have different activities with listviews. The data comes from the server using the REST method, and it only executes once when I launch the application.
The template I would like to install is to preload all the lists using JSON, which I already have on the local network, and simultaneously run a stream that receives new JSON files with my REST methods, and then update the ListViews.
So far, when I launch the application, I parse the JSON files and build all the lists of objects. I access them later in a static way, from my adapter lists.
So, I would like to know how best to run this REST stream and update the listview. Should I use AsyncTask? Service? and then when I update my local JSONs, do I need to reanalyze them, update the object lists and call my NotifyDataChanged adapters?
thank
Chayy source
share