AsyncTask makes Threading fun
Threading can be a hard issue for developers and whenever you have to implement some threading yourself it’s always a hard job and the code you produce will never look great! So if we can avoid to implement Runnable and all the stuff we probably will. However I implemented some threading myself in an Android application and it didn’t look nice at all!
Threading in an Android application? Indeed, and here’s why. In Android if you want to show a loading dialog while you are loading some data from let’s say a web service (which can take some time to finish as you are not entirely sure what kind of internet connection is available on the device) you have to start using threading. The reason why you have to use threading for it is because the loading dialog needs to be updated all the time (with a percentage, some graphical circle that goes around etc) and at the exact same time you want to get your data from your service. (meer…)