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

Projects
None yet
5 participants
@mu29
Copy link
Contributor

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

@analysis-bot
Copy link

left a comment

Code analysis results:

  • eslint found some issues. Run yarn lint --fix to automatically fix problems.
Show resolved Hide resolved Libraries/Linking/Linking.js

@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

left a comment

Looks good!

@facebook-github-bot
Copy link

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

This comment has been minimized.

Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.