public class UploadServiceSingleBroadcastReceiver extends UploadServiceBroadcastReceiver
BroadcastReceiver.PendingResult| Constructor and Description |
|---|
UploadServiceSingleBroadcastReceiver(UploadStatusDelegate delegate) |
| Modifier and Type | Method and Description |
|---|---|
void |
onCancelled(Context context,
UploadInfo uploadInfo)
Called when the upload is cancelled.
|
void |
onCompleted(Context context,
UploadInfo uploadInfo,
ServerResponse serverResponse)
Called when the upload is completed successfully.
|
void |
onError(Context context,
UploadInfo uploadInfo,
ServerResponse serverResponse,
Exception exception)
Called when an error happens during the upload.
|
void |
onProgress(Context context,
UploadInfo uploadInfo)
Called when the upload progress changes.
|
void |
setUploadID(String uploadID) |
onReceive, register, unregisterabortBroadcast, clearAbortBroadcast, getAbortBroadcast, getDebugUnregister, getResultCode, getResultData, getResultExtras, goAsync, isInitialStickyBroadcast, isOrderedBroadcast, peekService, setDebugUnregister, setOrderedHint, setResult, setResultCode, setResultData, setResultExtraspublic UploadServiceSingleBroadcastReceiver(UploadStatusDelegate delegate)
public void setUploadID(String uploadID)
public final void onProgress(Context context, UploadInfo uploadInfo)
UploadStatusDelegateonProgress in interface UploadStatusDelegateonProgress in class UploadServiceBroadcastReceivercontext - contextuploadInfo - upload status informationpublic final void onError(Context context, UploadInfo uploadInfo, ServerResponse serverResponse, Exception exception)
UploadStatusDelegateonError in interface UploadStatusDelegateonError in class UploadServiceBroadcastReceivercontext - contextuploadInfo - upload status informationserverResponse - response got from the server. It can be null if the server has not
responded or if the request has not reached the server due to a
networking problem.exception - exception that caused the error. It can be null if the request successfully
reached the server, but it responded with a 4xx or 5xx status code.public final void onCompleted(Context context, UploadInfo uploadInfo, ServerResponse serverResponse)
UploadStatusDelegateonCompleted in interface UploadStatusDelegateonCompleted in class UploadServiceBroadcastReceivercontext - contextuploadInfo - upload status informationserverResponse - response got from the serverpublic final void onCancelled(Context context, UploadInfo uploadInfo)
UploadStatusDelegateonCancelled in interface UploadStatusDelegateonCancelled in class UploadServiceBroadcastReceivercontext - contextuploadInfo - upload status information