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

Fix android plugin functions are not called #42674

Closed
wants to merge 1 commit into from

Conversation

volzhs
Copy link
Contributor

@volzhs volzhs commented Oct 9, 2020

some functions are not called properly in android plugin after #39855

@volzhs volzhs added platform:android topic:plugin regression cherrypick:3.x Considered for cherry-picking into a future 3.x release labels Oct 9, 2020
@volzhs volzhs added this to the 4.0 milestone Oct 9, 2020
@volzhs volzhs requested a review from m4gr3d October 9, 2020 15:27
@akien-mga akien-mga added the bug label Oct 9, 2020
@m4gr3d
Copy link
Contributor

m4gr3d commented Oct 9, 2020

@volzhs The methods you added should already be automatically invoked based on the Fragment lifecycle. Is there an actual bug that's caused by not having them?

@volzhs
Copy link
Contributor Author

volzhs commented Oct 9, 2020

@m4gr3d yes. I'm having an issue which is onMainActivityResult is not called in android custom plugin.
with this fix, it solved.

@m4gr3d
Copy link
Contributor

m4gr3d commented Oct 9, 2020

@m4gr3d yes. I'm having an issue which is onMainActivityResult is not called in android custom plugin.
with this fix, it solved.

@volzhs Did you call startActivityForResult instead of getActivity().startActivityForResult as mentioned in this SO answer?

@m4gr3d
Copy link
Contributor

m4gr3d commented Oct 9, 2020

@m4gr3d yes. I'm having an issue which is onMainActivityResult is not called in android custom plugin.
with this fix, it solved.

@volzhs Did you call startActivityForResult instead of getActivity().startActivityForResult as mentioned in this SO answer?

@volzhs From the plugin code, it would be getGodot().startActivityForResult instead of getActivity().startActivityForResult.

@volzhs
Copy link
Contributor Author

volzhs commented Oct 9, 2020

@m4gr3d getGodot().startActivityForResult did fix my issue. 👍
I searched everywhere before this PR but couldn't find about this.
need documentation for it.
closing as this PR does not need.

@volzhs volzhs closed this Oct 9, 2020
@volzhs volzhs deleted the android-callback branch October 9, 2020 18:53
@volzhs volzhs added archived and removed bug cherrypick:3.x Considered for cherry-picking into a future 3.x release platform:android regression topic:plugin labels Oct 9, 2020
@volzhs volzhs removed this from the 4.0 milestone Oct 9, 2020
@m4gr3d
Copy link
Contributor

m4gr3d commented Oct 9, 2020

@volzhs Glad to hear! What were you using before?

@volzhs
Copy link
Contributor Author

volzhs commented Oct 9, 2020

@m4gr3d it was getActivity().startActivityForResult

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

Successfully merging this pull request may close these issues.

3 participants