Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@camsim99
Copy link
Contributor

@camsim99 camsim99 commented Mar 7, 2023

Adds an additional push of the initial route to the framework once the first Flutter frame has been rendered if it has not already been pushed.

This will catch the case of an app being launched by a deeplink that was not previously in the background, because when the app is not previously in the background, no call to push the correct initial route is currently being made and we must wait to push it after the FlutterActivity has been created, started, and resumed (in terms of the Activity lifecycle).

Fixes flutter/flutter#121244.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

@camsim99 camsim99 marked this pull request as ready for review March 7, 2023 20:17
Copy link
Member

@gaaclarke gaaclarke left a comment

Choose a reason for hiding this comment

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

I chatted with @camsim99 and one of our customers who was helping us debug this issue. I think the solution we want here is in #40148. I don't believe there is a reason to have both PR's. This fixes the issue but is a bit more distant to the source of the problem, pushing the route instead of starting the engine with the route. Let me know if there is anything I'm missing.

@camsim99
Copy link
Contributor Author

camsim99 commented Mar 8, 2023

Since I agree with @gaaclarke and the other fix has been verified, I'm going to go ahead and close this.

@camsim99 camsim99 closed this Mar 8, 2023
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] Flutter does not get the correct initial route when launch by a deep link

3 participants