Configure Notification in MultipartUploadRequest

Viewed 153

I m implementing 'net.gotev:uploadservice:4.5.1' to upload image to my server. I wrote below code but getting exception message Notification is not configured so file is not uploading. When i tried to configure notification using setNotificationConfig(new UploadNotificationConfig()), It ask for 6 Arguments to be passed in New UploadNotificationConfig().

Here is my complete code.

try {
            String uploadId = UUID.randomUUID().toString();

            //Creating a multi part request
            new MultipartUploadRequest(this, upload_path)
                    .addFileToUpload(currentPhotoPath, "image") //Adding file
                    .addParameter("name", image_file_name) //Adding text parameter to the request
                    .setMaxRetries(2).setNotificationConfig(new UploadNotificationConfig())
                    .setUploadID(uploadId)
                    .startUpload(); //Starting the upload



        } catch (Exception exc) {
            Toast.makeText(this, exc.getMessage(), Toast.LENGTH_SHORT).show();
        }

I tried but could not succeed to pass required arguments and get the method working. Can someone help to fix this.

Also attached image explaining kind of argument required. I understand first 2 but for other 4, not geting any idea how to work.

enter image description here

0 Answers
Related