public void uploadIdentificationCardScan()

in app/src/main/java/org/apache/fineract/ui/online/identification/uploadidentificationscan/UploadIdentificationCardPresenter.java [55:84]


    public void uploadIdentificationCardScan(String customerIdentifier, String identificationNumber,
            String scanIdentifier, String description, File file) {

        RequestBody requestFile =
                RequestBody.create(MediaType.parse("image/png"), file);
        MultipartBody.Part body =
                MultipartBody.Part.createFormData("image", "scan.png", requestFile);

        checkViewAttached();
        getMvpView().showProgressDialog();
        compositeDisposable.add(dataManagerCustomer.uploadIdentificationCardScan(
                customerIdentifier, identificationNumber, scanIdentifier, description, body)
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribeWith(new DisposableCompletableObserver() {
                    @Override
                    public void onComplete() {
                        getMvpView().hideProgressDialog();
                        getMvpView().showScanUploadedSuccessfully();
                    }

                    @Override
                    public void onError(Throwable throwable) {
                        getMvpView().hideProgressDialog();
                        showExceptionError(throwable, context
                                .getString(R.string.error_uploading_identification_scan_card));
                    }
                })
        );
    }