Search in sources :

Example 11 with ResultFile

use of com.fanap.podchat.model.ResultFile 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

ResultFile (com.fanap.podchat.model.ResultFile)11 ResultImageFile (com.fanap.podchat.model.ResultImageFile)9 ErrorOutPut (com.fanap.podchat.model.ErrorOutPut)8 RequestCreateThreadWithFile (com.fanap.podchat.requestobject.RequestCreateThreadWithFile)8 RequestUploadFile (com.fanap.podchat.requestobject.RequestUploadFile)8 ResultDownloadFile (com.fanap.podchat.chat.file_manager.download_file.model.ResultDownloadFile)7 ChatResponse (com.fanap.podchat.model.ChatResponse)7 MetaDataFile (com.fanap.podchat.model.MetaDataFile)7 RequestGetFile (com.fanap.podchat.requestobject.RequestGetFile)7 RequestGetPodSpaceFile (com.fanap.podchat.requestobject.RequestGetPodSpaceFile)7 File (java.io.File)7 Subscription (rx.Subscription)7 UploadToPodSpaceResult (com.fanap.podchat.chat.file_manager.upload_file.UploadToPodSpaceResult)6 RoomIntegrityException (com.fanap.podchat.persistance.RoomIntegrityException)6 PodChatException (com.fanap.podchat.util.PodChatException)6 JsonSyntaxException (com.google.gson.JsonSyntaxException)6 SentryException (io.sentry.core.protocol.SentryException)6 IOException (java.io.IOException)6 JSONException (org.json.JSONException)6 PodUploader (com.fanap.podchat.chat.file_manager.upload_file.PodUploader)5