public class FileDownloadServiceProxy extends java.lang.Object implements IFileDownloadServiceProxy
In case of FileDownloadService runs in the main process.,
In case of FileDownloadService runs in the separate
`:filedownloader` process.
You can add a command `process.non-separate=true` to `/filedownloader.properties` to make the
FileDownloadService runs in the main process, and by default the FileDownloadService runs in the
separate `:filedownloader` process.| Modifier and Type | Method and Description |
|---|---|
void |
bindStartByContext(android.content.Context context) |
void |
bindStartByContext(android.content.Context context,
java.lang.Runnable connectedRunnable) |
void |
clearAllTaskData() |
boolean |
clearTaskData(int id) |
static FDServiceSharedHandler.FileDownloadServiceSharedConnection |
getConnectionListener() |
static FileDownloadServiceProxy |
getImpl() |
long |
getSofar(int id) |
byte |
getStatus(int id) |
long |
getTotal(int id) |
boolean |
isConnected() |
boolean |
isDownloading(java.lang.String url,
java.lang.String path) |
boolean |
isIdle() |
boolean |
isRunServiceForeground() |
boolean |
pause(int id) |
void |
pauseAllTasks() |
boolean |
setMaxNetworkThreadCount(int count) |
boolean |
start(java.lang.String url,
java.lang.String path,
boolean pathAsDirectory,
int callbackProgressTimes,
int callbackProgressMinIntervalMillis,
int autoRetryTimes,
boolean forceReDownload,
FileDownloadHeader header,
boolean isWifiRequired) |
void |
startForeground(int notificationId,
android.app.Notification notification) |
void |
stopForeground(boolean removeNotification) |
void |
unbindByContext(android.content.Context context) |
public static FileDownloadServiceProxy getImpl()
public static FDServiceSharedHandler.FileDownloadServiceSharedConnection getConnectionListener()
public boolean start(java.lang.String url,
java.lang.String path,
boolean pathAsDirectory,
int callbackProgressTimes,
int callbackProgressMinIntervalMillis,
int autoRetryTimes,
boolean forceReDownload,
FileDownloadHeader header,
boolean isWifiRequired)
start in interface IFileDownloadServiceProxypublic boolean pause(int id)
pause in interface IFileDownloadServiceProxypublic boolean isDownloading(java.lang.String url,
java.lang.String path)
isDownloading in interface IFileDownloadServiceProxypublic long getSofar(int id)
getSofar in interface IFileDownloadServiceProxypublic long getTotal(int id)
getTotal in interface IFileDownloadServiceProxypublic byte getStatus(int id)
getStatus in interface IFileDownloadServiceProxypublic void pauseAllTasks()
pauseAllTasks in interface IFileDownloadServiceProxypublic boolean isIdle()
isIdle in interface IFileDownloadServiceProxypublic boolean isConnected()
isConnected in interface IFileDownloadServiceProxypublic void bindStartByContext(android.content.Context context)
bindStartByContext in interface IFileDownloadServiceProxypublic void bindStartByContext(android.content.Context context,
java.lang.Runnable connectedRunnable)
bindStartByContext in interface IFileDownloadServiceProxypublic void unbindByContext(android.content.Context context)
unbindByContext in interface IFileDownloadServiceProxypublic void startForeground(int notificationId,
android.app.Notification notification)
startForeground in interface IFileDownloadServiceProxypublic void stopForeground(boolean removeNotification)
stopForeground in interface IFileDownloadServiceProxypublic boolean setMaxNetworkThreadCount(int count)
setMaxNetworkThreadCount in interface IFileDownloadServiceProxypublic boolean clearTaskData(int id)
clearTaskData in interface IFileDownloadServiceProxypublic void clearAllTaskData()
clearAllTaskData in interface IFileDownloadServiceProxypublic boolean isRunServiceForeground()
isRunServiceForeground in interface IFileDownloadServiceProxy