android - Asynctask heavy usage -
asynctask designed helper class around thread , handler , not constitute generic threading framework. asynctasks should ideally used short operations (a few seconds @ most.)
this says in documentation.
speaking network language, how long 'a few seconds'?
my app following, array list db, send server, list (json), send okay received list, parse jsons, insert list inside db, other processes in db, update ui.. (the list can reach 5000-1000 entries of object instances.)
is usage of asynctask such stuff idea? need update gui according results of response server.
if no, other alternatives have?
i've did similar you. i've downloaded bunch of images (about 5000), saved in sd card , saved row in database. i've used async task no issues , see no problem using it. recommend use progress bar show user app doing , option cancel task (asynctask provides cancelation mechanism)
Comments
Post a Comment