Search in sources :

Example 1 with RetryUpload

use of com.fanap.podchat.requestobject.RetryUpload in project pod-chat-android-sdk by FanapSoft.

the class ChatActivity method retryUpload.

private void retryUpload() {
    /*
         * For file you should override onFinishFile or onFinishImage because their respond is different
         *
         * */
    String uniqueId = "2a28e2e8-bae2-4f92-80dd-ccb86bf1a17b";
    RetryUpload retryUpload = new RetryUpload.Builder().activity(ChatActivity.this).uniqueId(uniqueId).build();
    presenter.retryUpload(retryUpload, new ProgressHandler.sendFileMessage() {

        @Override
        public void onProgressUpdate(String uniqueId, int progress, int totalBytesSent, int totalBytesToSend) {
        }

        @Override
        public void onFinishFile(String json, ChatResponse<ResultFile> chatResponse) {
        }

        @Override
        public void onFinishImage(String json, ChatResponse<ResultImageFile> chatResponse) {
        }
    });
}
Also used : ResultImageFile(com.fanap.podchat.model.ResultImageFile) ProgressHandler(com.fanap.podchat.ProgressHandler) RetryUpload(com.fanap.podchat.requestobject.RetryUpload) ResultFile(com.fanap.podchat.model.ResultFile)

Aggregations

ProgressHandler (com.fanap.podchat.ProgressHandler)1 ResultFile (com.fanap.podchat.model.ResultFile)1 ResultImageFile (com.fanap.podchat.model.ResultImageFile)1 RetryUpload (com.fanap.podchat.requestobject.RetryUpload)1