sqlite - When should I use Loaders? and when asynctask? (Android) -
i still confused. have read several tutorials of loaders , asynctask in android can't understand differences in cases. example:
your app can't continue without information provided asynctask or loader
- if need information mysql database, better?
- and...what if need information sqlite database?
- maybe, might need data url.
your app can continue without information provided asynctask or loader
- if need information mysql database, better?
- and...what if need information sqlite database?
- maybe, might need data url.
if consider must mention more differences or other case, can write it.
well, both of them used perform asynchronous operations, doesn't matter if app can or can't continue without information. if app can continue wihtout data, still need process asynchronously avoid anr message.
one reason choose loader or asynctask if need data updates. advantage of loaders keep track of data accessing , deliver new results when data changes.
other difference loaders don't have worry configuration changes (orientation change e.g.). loadermanager takes care of you. asynctask need take care of yourself.
and there asynctaskloader, asynctask benefits of loaders.
the advantage of asynctask is simple use. if don't need load or monitor data, process in background. asynctask still choice.
Comments
Post a Comment