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): save activity result launcher calls #5004

Merged
merged 5 commits into from
Sep 3, 2021
Merged

Conversation

jcesarmobile
Copy link
Member

@jcesarmobile jcesarmobile commented Sep 2, 2021

When using activity result launchers, the call is not being saved, so if the app dies, the appRestoredResult event won't be fired

Also getSavedCall() is deprecated and not returning the proper value, switched to bridge.getSavedCall(lastPluginCallId);

closes #5003

@jcesarmobile jcesarmobile merged commit 2c1eb60 into main Sep 3, 2021
@jcesarmobile jcesarmobile deleted the restore-result branch September 3, 2021 08:57
@mfs409
Copy link

mfs409 commented Sep 3, 2021

Thanks so much! Sorry for the naive question, but if I want to use this patch, is it a simple matter of doing an npm update, or do I need to get the code some other way?

@jcesarmobile
Copy link
Member Author

the fix will be available on next @capacitor/android release, so once it's released you can do npm install @capacitor/android@latest and you'll get the fix, but you'll have to wait for the release

@mfs409
Copy link

mfs409 commented Sep 3, 2021

FWIW, I replicated the changes to Bridge.java and Plugin.java in the corresponding files in my node_modules tree, and then re-built the minimal failing code. The behavior changed, and now the failing code is passing. Thanks so much!

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

Successfully merging this pull request may close these issues.

Android: Camera Plugin returns null data when Activity not kept
3 participants