RxActivityResult icon indicating copy to clipboard operation
RxActivityResult copied to clipboard

RxActivityResult不回调onComplete

Open YuYongzhi opened this issue 7 years ago • 0 comments

RxActivityResult.startActivityForResult(this, intent, REQUEST_CODE) .subscribe( new Consumer<ActivityResult>() { @Override public void accept(@NonNull ActivityResult result) throws Exception { if (result.isOk()) { final Intent data = result.getData(); // DO SOME THING } } }, new Consumer<Throwable>() { @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();

YuYongzhi avatar Aug 07 '17 05:08 YuYongzhi