3

I am new to Android and I am currently working on a project that requires a lot of Http requests on a web API.

I have been searching for good practices about refactoring AsyncTask subclasses, so I don't have to write a lot of similar code into each Activity class.

Do you have any tips/advices or even an example of how you proceed ?

Thank you.

zovakk
  • 195
  • 1
  • 1
  • 11

1 Answers1

0

I think what you are talking about is already answered here In this answer it has a same topic's discussion, Although i also know some blogs that can help you to make it more conceptually clear read them,

Links:

https://trinitytuts.com/reusable-asynctasks-class-in-android/

http://cyriltata.blogspot.in/2013/10/android-re-using-asynctask-class-across.html

Community
  • 1
  • 1
TapanHP
  • 5,969
  • 6
  • 37
  • 66