public class FDServiceSeparateHandler extends IFileDownloadIPCService.Stub implements MessageSnapshotFlow.MessageReceiver
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkDownloading(java.lang.String url,
java.lang.String path) |
void |
clearAllTaskData() |
boolean |
clearTaskData(int id) |
long |
getSofar(int downloadId) |
byte |
getStatus(int downloadId) |
long |
getTotal(int downloadId) |
boolean |
isIdle() |
android.os.IBinder |
onBind(android.content.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(android.content.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(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 id,
android.app.Notification notification) |
void |
stopForeground(boolean removeNotification) |
void |
unregisterCallback(IFileDownloadIPCCallback callback) |
public void registerCallback(IFileDownloadIPCCallback callback)
throws android.os.RemoteException
android.os.RemoteExceptionpublic void unregisterCallback(IFileDownloadIPCCallback callback)
throws android.os.RemoteException
android.os.RemoteExceptionpublic boolean checkDownloading(java.lang.String url,
java.lang.String path)
throws android.os.RemoteException
android.os.RemoteExceptionpublic void start(java.lang.String url,
java.lang.String path,
boolean pathAsDirectory,
int callbackProgressTimes,
int callbackProgressMinIntervalMillis,
int autoRetryTimes,
boolean forceReDownload,
FileDownloadHeader header,
boolean isWifiRequired)
throws android.os.RemoteException
android.os.RemoteExceptionpublic boolean pause(int downloadId)
throws android.os.RemoteException
android.os.RemoteExceptionpublic void pauseAllTasks()
throws android.os.RemoteException
android.os.RemoteExceptionpublic boolean setMaxNetworkThreadCount(int count)
throws android.os.RemoteException
android.os.RemoteExceptionpublic long getSofar(int downloadId)
throws android.os.RemoteException
android.os.RemoteExceptionpublic long getTotal(int downloadId)
throws android.os.RemoteException
android.os.RemoteExceptionpublic byte getStatus(int downloadId)
throws android.os.RemoteException
android.os.RemoteExceptionpublic boolean isIdle()
throws android.os.RemoteException
android.os.RemoteExceptionpublic void startForeground(int id,
android.app.Notification notification)
throws android.os.RemoteException
android.os.RemoteExceptionpublic void stopForeground(boolean removeNotification)
throws android.os.RemoteException
android.os.RemoteExceptionpublic boolean clearTaskData(int id)
throws android.os.RemoteException
android.os.RemoteExceptionpublic void clearAllTaskData()
throws android.os.RemoteException
android.os.RemoteExceptionpublic void onStartCommand(android.content.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 android.os.IBinder onBind(android.content.Intent intent)
FDServiceSeparateHandlerpublic void onDestroy()
public void receive(MessageSnapshot snapShot)
receive in interface MessageSnapshotFlow.MessageReceiver