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

onActivityResult - onRequestPermissionsResult support in Activity/Controller class #61

Open
brcbydr opened this issue Jul 20, 2020 · 0 comments

Comments

@brcbydr
Copy link

brcbydr commented Jul 20, 2020

Hi @dmdevgo ,

Sorry for disturbing again but this is important.

RxPm already handles CREATED, BINDED, RESUMED, PAUSED, UNBINDED, DESTROYED.
But onActivityResult and onRequestPermissionsResult not supported. Function results like login etc should handled in onActivityResult. And with RxPm, business logic can not be in Controller or Activity, it should be in presenter.

Conductor support onActivityResult is like that: (https://github.com/bluelinelabs/Conductor/blob/develop/conductor/src/main/java/com/bluelinelabs/conductor/Router.java)

Implementation is like below:
`class MainActivity : AppCompatActivity() {

private lateinit var router: Router

override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
    super.onActivityResult(requestCode, resultCode, data)
    router.onActivityResult(requestCode, resultCode, data)
}

}`

I think it makes sense to support onActivityResult in PresentationModel according to Router.
What do you think about that?

Thanks in advance.

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