I am little bit confused with multithreading in Android. I am aware we can achieve using AsyncTask
and Handler
. Generally when should we implement by extending Thread Class in Android? Can anyone give an example that we need to do it only by extending thread class but not with AsyncTask
or Handler
.
Consider a example app, we have a bouncing ball in an activity(forget the animation part), I need to change the color of the ball every 20 minutes, and I need to get the color code from the server and update the ball UI. Now how can I achieve this ? Can someone explain using
AsyncTask
orHandler
and also only using Thread Class(withoutAsynctask
orHandler
)?How should I handle downloading large payloads from server using services.