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

RxActivityResult不回调onComplete #3

Open
YuYongzhi opened this issue Aug 7, 2017 · 0 comments
Open

RxActivityResult不回调onComplete #3

YuYongzhi opened this issue Aug 7, 2017 · 0 comments

Comments

@YuYongzhi
Copy link

YuYongzhi commented Aug 7, 2017

RxActivityResult.startActivityForResult(this, intent, REQUEST_CODE)
.subscribe(
new Consumer() {
@OverRide
public void accept(@nonnull ActivityResult result) throws Exception {
if (result.isOk()) {
final Intent data = result.getData();
// DO SOME THING
}
}
},
new Consumer() {
@OverRide
public void accept(@io.reactivex.annotations.NonNull Throwable throwable) throws Exception {
}
},
new Action() {
@OverRide
public void run() throws Exception {

                        }
                    }
            );

在ResultHandleV4Fragment 和 ResultHandleFragment 的 onActivityResult 中的
resultPublisher.onNext(new ActivityResult(requestCode, resultCode, data));
之后添加
resultPublisher.onComplete();

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

1 participant