-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Added onActivityResult to MainActivity.java and IPythonApp.java #25
Conversation
{ | ||
Log.d(TAG, "onActivityResult() start"); | ||
super.onActivityResult(requestCode, resultCode, data); | ||
pythonApp.onActivityResult(requestCode, resultCode, data); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@freakboy3742 Should we do as hasattr
check for pythonApp.onActivityResult
here? I think it's OK to skip that check if the template can expect a version of Toga with the new onActivityResult
code in beeware/toga#1158 . Wanted to double-check with you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get the intention, but I think this will be safe without the hasattr
guard. We're only going to get an activity result if the code starts an activity... and that won't be happening until the code is merged into Toga to start activities in the first place.
@t-arn This is really cool! I think it's great. From my perspective, it looks good to me. I'll allow @freakboy3742 to more-officially review it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR - apologies for the delay in reviewing/merging.
{ | ||
Log.d(TAG, "onActivityResult() start"); | ||
super.onActivityResult(requestCode, resultCode, data); | ||
pythonApp.onActivityResult(requestCode, resultCode, data); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get the intention, but I think this will be safe without the hasattr
guard. We're only going to get an activity result if the code starts an activity... and that won't be happening until the code is merged into Toga to start activities in the first place.
Added onActivityResult to MainActivity.java and IPythonApp.java
This PR adds the method onActivityResult() in MainActivity.java and IPythonApp.java
This allows us to invoke Android Intents from Python and get the result back.
This template is used by following pull-request: beeware/toga#1158
PR Checklist: