public class FDServiceSeparateHandler extends IFileDownloadIPCService.Stub implements MessageSnapshotFlow.MessageReceiver
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkDownloading(String url,
String path) |
void |
clearAllTaskData() |
boolean |
clearTaskData(int id) |
long |
getSofar(int downloadId) |
byte |
getStatus(int downloadId) |
long |
getTotal(int downloadId) |
boolean |
isIdle() |
IBinder |
onBind(Intent intent)
Will establish the connection with binder in
FDServiceSeparateHandler |
void |
onDestroy()
Called by the system to notify a Service that it is no longer used and is being removed.
|
void |
onStartCommand(Intent intent,
int flags,
int startId)
Will used to handling the onConnected in
FDServiceSharedHandler.FileDownloadServiceSharedConnection. |
boolean |
pause(int downloadId) |
void |
pauseAllTasks() |
void |
receive(MessageSnapshot snapShot) |
void |
registerCallback(IFileDownloadIPCCallback callback) |
boolean |
setMaxNetworkThreadCount(int count) |
void |
start(String url,
String path,
boolean pathAsDirectory,
int callbackProgressTimes,
int callbackProgressMinIntervalMillis,
int autoRetryTimes,
boolean forceReDownload,
FileDownloadHeader header,
boolean isWifiRequired) |
void |
startForeground(int id,
Notification notification) |
void |
stopForeground(boolean removeNotification) |
void |
unregisterCallback(IFileDownloadIPCCallback callback) |
public void registerCallback(IFileDownloadIPCCallback callback)
throws RemoteException
RemoteExceptionpublic void unregisterCallback(IFileDownloadIPCCallback callback)
throws RemoteException
RemoteExceptionpublic boolean checkDownloading(String url, String path) throws RemoteException
RemoteExceptionpublic void start(String url, String path, boolean pathAsDirectory, int callbackProgressTimes, int callbackProgressMinIntervalMillis, int autoRetryTimes, boolean forceReDownload, FileDownloadHeader header, boolean isWifiRequired) throws RemoteException
RemoteExceptionpublic boolean pause(int downloadId)
throws RemoteException
RemoteExceptionpublic void pauseAllTasks()
throws RemoteException
RemoteExceptionpublic boolean setMaxNetworkThreadCount(int count)
throws RemoteException
RemoteExceptionpublic long getSofar(int downloadId)
throws RemoteException
RemoteExceptionpublic long getTotal(int downloadId)
throws RemoteException
RemoteExceptionpublic byte getStatus(int downloadId)
throws RemoteException
RemoteExceptionpublic boolean isIdle()
throws RemoteException
RemoteExceptionpublic void startForeground(int id,
Notification notification)
throws RemoteException
RemoteExceptionpublic void stopForeground(boolean removeNotification)
throws RemoteException
RemoteExceptionpublic boolean clearTaskData(int id)
throws RemoteException
RemoteExceptionpublic void clearAllTaskData()
throws RemoteException
RemoteExceptionpublic void onStartCommand(Intent intent, int flags, int startId)
FDServiceSharedHandler.FileDownloadServiceSharedConnection.
Called by the system every time a client explicitly starts the service by calling
Context.startService(android.content.Intent).public IBinder onBind(Intent intent)
FDServiceSeparateHandlerpublic void onDestroy()
public void receive(MessageSnapshot snapShot)
receive in interface MessageSnapshotFlow.MessageReceiver