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

onRequestPermissionResult and onActivityResult support #63

Open
bangarharshit opened this issue Dec 7, 2017 · 4 comments
Open

onRequestPermissionResult and onActivityResult support #63

bangarharshit opened this issue Dec 7, 2017 · 4 comments

Comments

@bangarharshit
Copy link

onRequestPermissionResult and onActivityResult support in Screen. These methods propagate the request to activity and then propagate the result back to correct screen.

It will make it much easier for the implementors of Screen.

@revdfdev
Copy link

you can make methods / functions in screen/ basescreenview to pass data to the screen from on activity with when / switch case statements implemented in onActivityResult or onRequestPermissionResult.

use language features like abstraction in this case rather getting it implemented in the library.

@bangarharshit
Copy link
Author

Methods like this should be in the library. Every single app which is non-trivial needs to deal with permission and going to write same useless repetitive logic on their end (it needs a change in both Activity and Screen).

Also, keeping in library creates a much better abstraction. Conductor does this and is one of the issues as mentioned in this Reddit thread (I'm not sure why their implementation is so complex, why can't permission or activity result be just delegated to the topmost screen).

The only reason it should not be in the library is that the author doesn't need it and anyone can fork and add it to their version.

@fabiendevos
Copy link
Contributor

It's true that we want to be careful about adding too much in the lib, but in this case I agree that this should be part of the library.

@bangarharshit
Copy link
Author

Agreed. I think a very simple implementation will make life much easier for other devs. I tried implementing it in a PR #64 and would love to make it even more simple.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants