I'm totally new to Android and I'm developing my first app. In this app I only use Internet twice a day. The first time, at the beginning of the day , when the user downloads all the necessary data to work during the day , and the second time at the end of the day to send all the results of the day's operations to the server(to sync data)
I know that I should use a different thread for operations that are known to take some time, like downloading data from the Internet.But what happened to the AsyncTask when the user is downloading data or sending data to server , and he/she receives a phone call?
For other operations in my app, it doesn't matter if I need to start all over again, but for these two operations that use the Internet I don't think it would be a good idea.
So knowing that a Service will continue to run no matter what happens to the Activity, the question is, what should I use for these two operations that use the Internet? an AsyncTask or a Service with a Thread??
Thanks in advance.