Skip to content
This repository has been archived by the owner on Apr 2, 2021. It is now read-only.

Fix sharing callback doesn't get called on Android. #617

Merged

Conversation

HelloCore
Copy link
Contributor

Fixes #606

Android ShareDialog callback doesn't work.

Used one FBActivityEventListener instance instead of multiple instances.

Previously, we have one FBActivityEventListener for each module, and each one has CallbackManager.
However, after sharing something, the first CallbackManager that got called will run this static callback (because we didn't register the callback to this manager), and make AppCall invalid.
As a result, the CallbackManager for sharing module won't get called, because it has already been cleared

Test Plan:

Could be tested with the share button on the example app.

Video here.

@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

Copy link
Contributor

@janicduplessis janicduplessis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry about the delay on this, thanks for investigating this!

@janicduplessis janicduplessis merged commit e7e87f1 into facebookarchive:master Aug 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Android] ShareDialog callback promise does not start
3 participants