rohit sharma
rohit sharma

Reputation: 27

Thread pool executor with background and ui thread vs Async task in android?

i am doing lot of work in background in android like downloading ,sending request to server and getting json data etc. I am using asynctask there but i have another way to do this work by using handler and executor etc. I want to know which one is better way when lot of background work are going on.

Upvotes: 1

Views: 945

Answers (1)

Qiang Jin
Qiang Jin

Reputation: 4467

Just use AsyncTask.

If you look into the source code of AsyncTask, you'll find AsyncTask just uses ThreadPoolExecutor and Handler.

Upvotes: 1

Related Questions