world!
I’m building an application that has to retrieve data from a server in several different Activitys. Some data is cached to a SQLite database (and retrieved from there instead in future), and some must be called fresh from the server every time. I need to know what the best multi-threaded architecture would be for this application. Multiple Activitys will be connecting to the server.
I’m thinking a bound Service would be best, but of course I’m not sure. If that’s the way to go, how exactly do I implement multi-threading in it?
Thanks
The android classes such as IntentService and AsynTask are thread safest because they will not keep your activity open when your activity’s finish method is called. If you create your own Thread implementation you must remember to stop the thread on Activity finish so that the process’ memory will be reclaimed.