gotev/android-upload-service

Hey Please add support for java or someone give java example with events(ie:onprogress,oncompleted)

VikashAnandJha opened this issue · 1 comments

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Are you willing to implement it and maintain it?

  • Yes
  • Can implement it with a Pull Request, but not maintain it
  • No

I think I figured it out. Anyway thankx
try {
MultipartUploadRequest request= new MultipartUploadRequest(this,"URL").setMethod("POST")
.addFileToUpload(
filepath,"my_file");
request.subscribe(this, this, new RequestObserverDelegate() {
@OverRide
public void onProgress(@nonnull Context context, @nonnull UploadInfo uploadInfo) {

         }

         @Override
         public void onSuccess(@NonNull Context context, @NonNull UploadInfo uploadInfo, @NonNull ServerResponse serverResponse) {

         }

         @Override
         public void onError(@NonNull Context context, @NonNull UploadInfo uploadInfo, @NonNull Throwable throwable) {

         }

         @Override
         public void onCompleted(@NonNull Context context, @NonNull UploadInfo uploadInfo) {

         }

         @Override
         public void onCompletedWhileNotObserving() {

         }
     });
     request.startUpload();

    } catch (FileNotFoundException e) {
        e.printStackTrace();
    }