I've been building medium sized information systems for a year now, using Android as one of the client-side, but I have never used a Service
before. To request data from the server, I always fire a request using AsyncTask
. When the user enter the corresponding Activity
.
A diagram might be represented by the following:
-> fires -> AsyncTask -> request from network and insert into local -> refresh view
Activity#onCreate()
-> query local database -> refresh view
Since AsyncTask
executes on a background thread, there are no bug issues or similar.
Can I get a REAL explanation on Services
vs AsyncTask
on network operations?