Ideal way to cancel an executing AsyncTask

前端 未结 9 2210
不思量自难忘°
不思量自难忘° 2020-11-22 05:54

I am running remote audio-file-fetching and audio file playback operations in a background thread using AsyncTask. A Cancellable progress bar is sh

9条回答
  •  滥情空心
    2020-11-22 06:47

    The only way to do it is by checking the value of the isCancelled() method and stopping playback when it returns true.

提交回复
热议问题