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

Copy link

@analysis-bot analysis-bot left a comment

Code analysis results:

  • eslint found some issues. Run yarn lint --fix to automatically fix problems.
Libraries/Linking/Linking.js Show resolved Hide resolved
@mu29 mu29 force-pushed the mu29:fix/android-deep-link branch from e8e6520 to a92f8b2 May 8, 2019
@cpojer
cpojer approved these changes May 8, 2019
Copy link
Contributor

@cpojer cpojer left a comment

Looks good!

Copy link

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

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

@react-native-bot
Copy link

@react-native-bot react-native-bot commented May 8, 2019

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

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

@satya164
Copy link
Collaborator

@satya164 satya164 commented Feb 14, 2020

This change seems to be causing this issue #25675

@Stephen2
Copy link

@Stephen2 Stephen2 commented Feb 24, 2020

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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

7 participants