Issue
I have been reading around on internet connectivity with Android and noticed there are different ways to handle this i.e. AsyncTask
and IntentService
. However, I'm still not sure which one to use. My application is basically a location/trails finder with Google Maps. My internet connectivity will be used to find the nearest trails within a certain radius of the map. So, every time a user moves or swipes the map to a new location then it will update with the nearest trails. It will also add a new trail, and allow the user to rate a trail.
Will AsyncTask
suffice for this or should I use IntentService
?
Solution
You should use an AsyncTask
for short repetitive tasks that are tightly bound to an activity, like what you're currently trying to do. IntentService
are more geared towards scheduled tasks (repetitive or not) that should run on the background, independent of your activity.
Answered By - ebarrenechea
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.