I'm building a small test app that interacts with some basic php scripts on my server.
Essentially I have three activities that each download the same information which I parse in slightly different way for each.
At the moment I have simply copied the async task function to each of the activities.
I'm sure this is a needless replication and that their must be a way to share this function between each of the activities.
Is it possible for me to hold the async task in a separate class and call it from each?
Eg. I can call "async task class" from Activity A,B or C, it starts on a background thread then returns the unparsed results to the ui thread when its done?