Added in API level 1
public interface

IDownloadManager

com.ardic.android.managers.download.IDownloadManager

Class Overview

Provides set of API for download utils.

Summary

Constants
String ACTION_AFEX_DOWNLOAD_STATE
int DESTINATION_EXTERNAL
int DESTINATION_FILE_URI
int DESTINATION_SYSTEMCACHE_PARTITION
int NOTIFY_HIDDEN
int NOTIFY_VISIBLE
int NOTIFY_VISIBLE_COMPLETED
int NOTIFY_VISIBLE_ONLY_COMPLETION
int STATUS_FAILED
int STATUS_PAUSED
int STATUS_PENDING
int STATUS_RUNNING
int STATUS_SUCCESSFUL
Public Methods
abstract boolean cancelDownload(long id)
abstract String getDownloadFilename(long downloadId)
abstract long getDownloadIdByTitle(String title)
abstract long getDownloadIdByTitleAndDestination(String title, int destination)
abstract int getDownloadState(long downloadId)
abstract Uri getUriForDownloadedFile(long id)
abstract void removeDownloadsByTitle(String title)
abstract void removeDownloadsByTitleAndDestination(String title, int destination)
abstract void removeFile(String path)
abstract void setDownloadStateObserver(long downloadId)
abstract int setTitle(long downloadId, String title)
abstract void showProgressOnConsole(long downloadId)
abstract long silentFileDownload(String url, String destinationPath, String mimeType)
abstract long startDownload(String url, String destinationType, String dirType, String subPath, boolean visibilityUI, int visibilityNotify, Map requestHeaders, boolean mobileNetworkAllowed, String description, String title, String mimeType)

Constants

public static final String ACTION_AFEX_DOWNLOAD_STATE

Added in API level 1

Constant Value: "com.ardic.android.intent.action.AFEX_DOWNLOAD_STATE"

public static final int DESTINATION_EXTERNAL

Added in API level 1

Constant Value: 0 (0x00000000)

public static final int DESTINATION_FILE_URI

Added in API level 1

Constant Value: 4 (0x00000004)

public static final int DESTINATION_SYSTEMCACHE_PARTITION

Added in API level 1

Constant Value: 5 (0x00000005)

public static final int NOTIFY_HIDDEN

Added in API level 1

Constant Value: 2 (0x00000002)

public static final int NOTIFY_VISIBLE

Added in API level 1

Constant Value: 0 (0x00000000)

public static final int NOTIFY_VISIBLE_COMPLETED

Added in API level 1

Constant Value: 1 (0x00000001)

public static final int NOTIFY_VISIBLE_ONLY_COMPLETION

Added in API level 1

Constant Value: 3 (0x00000003)

public static final int STATUS_FAILED

Added in API level 1

Constant Value: 16 (0x00000010)

public static final int STATUS_PAUSED

Added in API level 1

Constant Value: 4 (0x00000004)

public static final int STATUS_PENDING

Added in API level 1

Constant Value: 1 (0x00000001)

public static final int STATUS_RUNNING

Added in API level 1

Constant Value: 2 (0x00000002)

public static final int STATUS_SUCCESSFUL

Added in API level 1

Constant Value: 8 (0x00000008)

Public Methods

public abstract boolean cancelDownload (long id)

Added in API level 1

Parameters
id long
Returns
boolean
Throws
AfexException

public abstract String getDownloadFilename (long downloadId)

Added in API level 1

Parameters
downloadId long
Returns
String
Throws
AfexException

public abstract long getDownloadIdByTitle (String title)

Added in API level 1

Parameters
title String
Returns
long
Throws
AfexException

public abstract long getDownloadIdByTitleAndDestination (String title, int destination)

Added in API level 1

Parameters
title String
destination int
Returns
long
Throws
AfexException

public abstract int getDownloadState (long downloadId)

Added in API level 1

Parameters
downloadId long
Returns
int
Throws
AfexException

public abstract Uri getUriForDownloadedFile (long id)

Added in API level 1

Parameters
id long
Returns
Uri
Throws
AfexException

public abstract void removeDownloadsByTitle (String title)

Added in API level 1

Parameters
title String
Throws
AfexException

public abstract void removeDownloadsByTitleAndDestination (String title, int destination)

Added in API level 1

Parameters
title String
destination int
Throws
AfexException

public abstract void removeFile (String path)

Added in API level 1

Parameters
path String
Throws
AfexException

public abstract void setDownloadStateObserver (long downloadId)

Added in API level 1

Parameters
downloadId long
Throws
AfexException

public abstract int setTitle (long downloadId, String title)

Added in API level 1

Parameters
downloadId long
title String
Returns
int
Throws
AfexException

public abstract void showProgressOnConsole (long downloadId)

Added in API level 1

Parameters
downloadId long
Throws
AfexException

public abstract long silentFileDownload (String url, String destinationPath, String mimeType)

Added in API level 1

Parameters
url String
destinationPath String
mimeType String
Returns
long
Throws
AfexException

public abstract long startDownload (String url, String destinationType, String dirType, String subPath, boolean visibilityUI, int visibilityNotify, Map requestHeaders, boolean mobileNetworkAllowed, String description, String title, String mimeType)

Added in API level 1

Parameters
url String
destinationType String
dirType String
subPath String
visibilityUI boolean
visibilityNotify int
requestHeaders Map
mobileNetworkAllowed boolean
description String
title String
mimeType String
Returns
long
Throws
AfexException