How do I start and receive the result from a Activity inside the same 'Reactive chain'? Is it possible to wrap the startActivityForResult and onActivityResult; if so how would I accomplish that?
First create a wrapper class that holds the result and request codes, and the intent. Let's call it Result
You can create a PublishSubject field in your Activity class. Let's call it subject.
Then you just call subject.onNext(new Result(requestCode, resultCode, data)); inside your onActivityResult method.
And finally you chain the subject the way you would an observable to your RX chain using a flatMap or some other operator based on what you need.
Sorry for poor formatting, I'm on my phone.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With