-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[firebase_dynamic_links] support clicking on link while app is running. #1569
Conversation
|
Hi @roeierez, Thanks for the contribution! You said that you were unable to retrieve the link while the app was already running. The plugin should already be able to handle this. Where did you click a link that led to Also, according to the documentation, the call to |
|
Hi @bparrishMines, Thanks for your quick reply!
Hi, sorry for not being clear. The case is exactly as follows:
I think the problem resides in the fact that the code always use
Yes I see that although from my experience (I tested again) after I start the app with a link every call to "retrieveDynamicLink" returns the same link without cleaning it. |
|
I’m having this exact issue on IOS. Android is working fine for me. Could this be a problem with our fire base configuration? |
… running. This commit checks for dynamic links on any new intent and remove the limitation for the fluter activity intent only. This way users can retrieve the dynamic link that was clicked while the app was running. In addition the old links is cleaned up every time the link was sent successfully to the user to get a better and more expected behavior. This behavior now matches the behavior on ios.
f17f5e2 to
92f7f1f
Compare
|
Hi @roeierez, I was unable to reproduce the bug for the first problem. Based on your explanation and the documentation for onNewIntent, you should be correct. If this PR solves this problem for you, then we can go ahead and submit. I was able to reproduce the second bug and changed your code a little to cache the intent rather than storing the task and data. |
|
@Baileypollard which problem are you running into on iOS?
Would you mind creating a separate issue for iOS? If not, I can create it. |
|
@bparrishMines thanks. Caching the intent looks good to me. |
bparrishMines
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…g and fix clearing data in dynamic link intent bug. (flutter#1569)
|
Still facing the same issue |
Background:
On Android there is a different behavior than in iOS which I think is the expected one.
To solve the first problem I added a check for the existence of a dynamic link on every new intent instead of the current behavior that checks only on the fluter activity intent.
In addition (for the second problem) I added a cleanup for the old link every time it was retrieved
successfully by the user.
This PR matches the behavior on iOS.
Breaking Change
The
retrieveDynamicLinkswill now clean the value that it returns, means it will return a specific link only once.