Android stop download
问题 In my application I download and parse a html page. However, I want to be able to stop the download in its tracks (i.e. when the user hits cancel). This is the code I use now, which is being called from doInBackground from ASyncTask. How do I cancel this request from outside of the ASyncTask? I currently use htmlcleaner HtmlCleaner cleaner = new HtmlCleaner(); CleanerProperties props = cleaner.getProperties(); props.setAllowHtmlInsideAttributes(true); props.setAllowMultiWordAttributes(true);