In my android app I am performing some operations in the doInBackground
by extending AsyncTask
class. (I have no use in per
I don't think there is any proper use. You can use asynctask to perform intensive operations on background thread and publish result, updates on main thread. It's not mandatory that you must publish result or progress. That's given to you. Your decision.
But for your network operations, you can use thread also. But later you decided to publish result and progress on main thread, Asynctask will help you in a simple way.
Threads don't.
Asynctask uses generic datatypes as parameters. You must provide it. If you don't want to provide or accept any data from asyctask. You can use Void type,
just like given below
class MessagePooling extends AsyncTask
It means asynctask will get no parameters, give you no progress or result.
For more about asynctask: http://androidride.com/beginners-guide-asynctask-android-tutorial-example/