java - AsyncTask cancelling issue -
java - AsyncTask cancelling issue -
i have asynctask , doinbackground method implementing takes more time in general. doing 2 async tasks , when sec 1 starts, want stop first one.
thus, if have
@override protected bitmap doinbackground(integer... params) { books.download(13); }
and heavy part happens in download(int) method actually.
now, when cancel(true) on task, want downloading stop. want books.download(13) method interrupted.
any way that?
android not interrupt method, have that. cancel(bool) invokes method oncancelled(bool). if don't implement method, nil happens.
java android multithreading android-asynctask
Comments
Post a Comment