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 request
        fileName - 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 transfer
        progress - 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 request
        fileName - Path where the sent or received file is stored. null if the error code is not SAFileTransfer.ERROR_NONE.
        errorCode - The error code corresponding to an ERROR_* value
        Since:
        2.0.19