Ideal way to cancel an executing AsnycTask

Posted by Samuh on Stack Overflow See other posts from Stack Overflow or by Samuh
Published on 2010-04-29T06:08:09Z Indexed on 2010/04/29 6:17 UTC
Read the original article Hit count: 336

Filed under:
|
|

I am running remote audio-file-fetching and audio file playback operations in a background thread using AsnycTask. A Cancellable progress bar is shown for the time the fetch operation runs.

I want to cancel/abort the AsnycTask run when the user cancels(decides against) the operation. What is the ideal way to handle such a case?

Thanks.

© Stack Overflow or respective owner

Related posts about android

Related posts about asynctask