Interface BackgroundTransfer.Listener
- Enclosing class:
BackgroundTransfer
public static interface BackgroundTransfer.Listener
Receives transfer progress and completion on the EDT.
-
Method Summary
Modifier and TypeMethodDescriptionvoidonComplete(BackgroundTransfer.Transfer transfer, boolean success, int status) Called once when the transfer ends.voidonProgress(BackgroundTransfer.Transfer transfer, long done, long total) Called as bytes move.
-
Method Details
-
onProgress
Called as bytes move.
Parameters
-
transfer: the transfer -
done: bytes transferred so far -
total: total bytes, or -1 when unknown
-
-
onComplete
Called once when the transfer ends.
Parameters
-
transfer: the transfer -
success: true when the server answered with a 2xx status -
status: the HTTP status, or -1 for a network error or cancel
-
-