VictorAlbertos / RxActivityResult

A reactive-tiny-badass-vindictive library to break with the OnActivityResult implementation as it breaks the observable chain.
Apache License 2.0
593 stars 72 forks source link

Feature/add request code parameter in result #38

Closed esunilkumare closed 7 years ago

esunilkumare commented 7 years ago

The Andorid method does have three parameters in the method onActivityResult: requestCode, resultCode and data.

onActivityResult(int requestCode, int resultCode, Intent data

I have added the requestCode parameter to your project in this PR. Please review and merge if OK

VictorAlbertos commented 7 years ago

What is the use case for this PR? Why do you need to supply a request code?

esunilkumare commented 7 years ago

While starting an activity for result, we can pass requestCode as well. We do have third party libraries which call back the onActivityResult with a specific requestCode. Then the third party vendor expect their API be called after checking a specific requestCode and pass this requestCode back to them. This was our requirement.

However, I think it would be a generic requirement to have requestCode in the callback method's Result method as well

VictorAlbertos commented 7 years ago

@esunilkumare thanks for this PR.

Do you mind updating the README file to reflect this change before merging?

esunilkumare commented 7 years ago

Thanks for your reply. Updated README.MD file to reflect the requestCode usage.