Code example for DownloadManager

Methods: remove

0
        editor.commit();
    } 
 
    private void startFlashActivity() { 
        if (isMatchedSum(getFile())) { 
            downloadManager.remove(preferenceManager.getLong(PREFERENCE_RELEASE_ID, 0));
            Intent intent = new Intent(this, FlashActivity.class);
            startActivity(intent);
        } else { 
            displayStatus("Failed", "Checksum does not match"); 
        } 
    } 
 
    private String getFile() {
        return (release != null) ? format("%s/%s", DIRECTORY_DOWNLOADS_FULL, release) : null;
    } 
 
    private String getSumFile() {
        return (getFile() != null) ? format("%s.sha256sum", getFile()) : null;
    } 
}