com.samsung.android.sdk.accessoryfiletransfer
Interface SAFileTransfer.EventListener
-
- Enclosing class:
- SAFileTransfer
public static interface SAFileTransfer.EventListener
Provides callbacks invoked when messages related to the file transfer transaction are received.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description void
onCancelAllCompleted(int errorCode)
Called when canceling all of the transactions requested by application is completed.void
onProgressChanged(int transactionId, int progress)
Called when the progress of file transfer changes.void
onTransferCompleted(int transactionId, java.lang.String fileName, int errorCode)
Called when the file transfer is completed.void
onTransferRequested(int transactionId, java.lang.String fileName)
Called when a file transfer request from Peer Agent has arrived to the receiver Peer Agent.
-
-
-
Method Detail
-
onTransferRequested
void onTransferRequested(int transactionId, java.lang.String fileName)
Called when a file transfer request from Peer Agent has arrived to the receiver Peer Agent. The receiver Peer Agent must be registered beforehand for the Accessory File Transfer Service to receive this callback.- Parameters:
transactionId
- The transaction id for the incoming file transfer requestfileName
- The fully qualified file name of the incoming file transfer- Since:
- 2.0.19
-
onProgressChanged
void onProgressChanged(int transactionId, int progress)
Called when the progress of file transfer changes. This callback indicates at both the sender and receiver Peer Agent.- Parameters:
transactionId
- Transaction id of the file transferprogress
- Progress in percentage(%)- Since:
- 2.0.19
-
onTransferCompleted
void onTransferCompleted(int transactionId, java.lang.String fileName, int errorCode)
Called when the file transfer is completed. This callback indicates at both the sender and receiver Peer Agent.- Parameters:
transactionId
- Transaction id of the file transfer requestfileName
- Path where the sent or received file is stored.null
if the error code is notSAFileTransfer.ERROR_NONE
.errorCode
- The error code corresponding to an ERROR_* value- Since:
- 2.0.19
-
onCancelAllCompleted
void onCancelAllCompleted(int errorCode)
Called when canceling all of the transactions requested by application is completed. This callback indicates the sender Peer Agent only.- Parameters:
errorCode
- The error code indicating the result of request. One of the error constants,SAFileTransfer.ERROR_NONE
,SAFileTransfer.ERROR_TRANSACTION_NOT_FOUND
,SAFileTransfer.ERROR_NOT_SUPPORTED
.- Since:
- 2.3.0
-
-