Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.AbstractMethodError: abstract method "io.reactivex.Observable rx_activity_result2.OnPreResult.response(int, int, android.content.Intent)" #70

Closed
LaysDragon opened this issue Apr 24, 2017 · 8 comments

Comments

@LaysDragon
Copy link

When I run Example code

        RxPaparazzo.single(this)
                .usingGallery()
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(new Consumer<Response<ChatActivity, FileData>>() {
                    @Override
                    public void accept(Response<ChatActivity, FileData> response) throws Exception {
                        // See response.resultCode() doc
                    /*if (response.resultCode() != RESULT_OK) {
                        response.targetUI().showUserCanceled();
                        return;
                    }

                    response.targetUI().loadImage(response.data());*/
                    }
                });

then get this exception
looks like the RxAtivityResult2 has update something but here is outdated.

@miguelbcr
Copy link
Owner

Hi @laysdra7265 !
I'll take a look this week.
If you figure out something let me know.
Thanks!

@LaysDragon
Copy link
Author

LaysDragon commented Apr 30, 2017

For work around ,I fix it by use the older version of RxActivityResult.
compile 'com.github.VictorAlbertos:RxActivityResult:0.4.0-2.x'
looks like the latest version of RxActivityResult change the
io.reactivex.Observable rx_activity_result2.OnPreResult.response(int, android.content.Intent)
to
io.reactivex.Observable rx_activity_result2.OnPreResult.response(int, int, android.content.Intent)
so in the com/miguelbcr/ui/rx_paparazzo2/interactors/PickFile.java should update the code of anonymous class of OnPreResult
in private OnPreResult getOnPreResultProcessing()

 private OnPreResult getOnPreResultProcessing() {
    return new OnPreResult() {
      @Override
      //Problem here
      public Observable<Uri> response(int responseCode, @Nullable final Intent intent) {
        if (responseCode == Activity.RESULT_OK && intent != null && intent.getData() != null) {

          Uri pickedUri = intent.getData();
          PermissionUtil.grantReadPermissionToUri(targetUi, pickedUri);

          return Observable.just(intent.getData());
        } else {
          return Observable.empty();
        }
      }
    };
  }

@miguelbcr
Copy link
Owner

I have no time this week, sorry. I'll try to fix it next week.
Anyway you are free to make a PR.
Thank you!

@onomated
Copy link

onomated commented Jun 5, 2017

Any intention of upgrading this to the latest RxActivityResult version soon? Or would you rather leave this supporting the current version?

@miguelbcr
Copy link
Owner

Hi all!,
sorry, I've been very busy last month. 😞
I hope to do it today, anyway PR are welcome.

@onomated
Copy link

onomated commented Jun 6, 2017

No problem. Definitely understand. If you can't get to it today, let me know and I'll take a stab at getting it all updated. If you have any process/procedures I should know about on developing in this codebase please let me know.

miguelbcr added a commit that referenced this issue Jun 6, 2017
…ult_mismatch

Fix #70 - rx_activity_result2.OnPreResult.response() params mismatch
@miguelbcr miguelbcr reopened this Jun 6, 2017
@miguelbcr
Copy link
Owner

Hi @laysdra7265 @onomated !
sorry for the late.
I've released version 0.5.3-2.x
Let me know if it works for you

@onomated
Copy link

onomated commented Jun 7, 2017

Works great! Tested from camera image capture, gallery images, remote images from Google drive etc. All good on my end.
Thanks a lot for a great component @miguelbcr !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants