I have to use Asynctask or service to update the database on Android

My requirement is to get data from a web page and update in the Android database (simple table), and from there I will query the database for sending notifications

Should I use an Async or Service task for it?

+3
source share
2 answers

You should use AsyncTask specifically. Service here is a big overhead.

In general, AsyncTask is used when you do small things (3-5 seconds), and it is normal to show a progress dialog. Services are designed for long-term processing of background tasks.

+4
source

get data from a web page and update in the Android database (simple table)

asyn-, - , .

Async Service ?

Asyn Task .

0

All Articles