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

[Android] Make Linking.getInitialURL works properly even if current activity is not initialized #24748

Closed
wants to merge 1 commit into from

Conversation

mu29
Copy link
Contributor

@mu29 mu29 commented May 8, 2019

Summary

Solves #15961 - [ANDROID] Linking.getInitialURL() returns null after exiting the app with back button and using deep linking again (only in production!)

As the issue says, it seems that currentActivity is null in IntentModule#getInitialURL. So I used the InteractionManager to wait until current activity to finish initializing.

Changelog

[Android] [Fixed] - In Linking.getInitialURL method, use the InteractionManager to wait for the current activity to finish initializing.

Test Plan

Here is an error case. After several trial, my app cannot open deep link.
Video link: https://youtu.be/0qppEs4O1Ls

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 8, 2019
Copy link

@analysis-bot analysis-bot left a comment

Choose a reason for hiding this comment

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

Code analysis results:

  • eslint found some issues. Run yarn lint --fix to automatically fix problems.

Libraries/Linking/Linking.js Show resolved Hide resolved
Copy link
Contributor

@cpojer cpojer left a comment

Choose a reason for hiding this comment

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

Looks good!

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@cpojer is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @mu29 in c802d0b.

When will my fix make it into a release? | Upcoming Releases

@react-native-bot react-native-bot added the Merged This PR has been merged. label May 8, 2019
@satya164
Copy link
Contributor

This change seems to be causing this issue #25675

@Stephen2
Copy link

UPDATE: I don't believe this change is responsible (or at least not wholly responsible). See update on #25675

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API: Linking Bug CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. Platform: Android Android applications.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants