llfbandit / app_links

Android App Links, Deep Links, iOs Universal Links and Custom URL schemes handler for Flutter.
https://pub.dev/packages/app_links
Apache License 2.0
206 stars 75 forks source link

URI not clear from listener #46

Closed water-user closed 1 year ago

water-user commented 1 year ago

I'm using Android 10, i setup custom schema (water://) and the schema is working perfect, i can open my app from other app by this schema. The problem is when i redirect to other app with some schema (in my case clal://), then the appLinks.allUriLinkStream.listen is calling again for some reason, with the last URI (water://).

I'm using url_launcher package to open other app, here's a snippet of code: url_launcher

Here's a screenshot of what happened when the launchUrl is call (line 288 in the screenshot above): app_link_listener

Does it related to

[ ] App Links (Android)
[X] Deep Links (Android)
[ ] Universal Links (iOS)
[ ] or Custom URL schemes? (iOS)

Does the example project work?

[ ] Yes
[ ] No
[X] Irrelevant here

Did you fully read the instructions for the targeted platform before submitting this issue? YES

Uploaded your files to webserver, HTTPS, direct connection, scheme pattern setup, ...

[X] Yes
[ ] No
[ ] Irrelevant here

llfbandit commented 1 year ago

Somehow I guess you are subscribing again to the stream. allUriLinkStream always starts by pushing initial link (if any).

water-user commented 1 year ago

So how can i reset it?

letungcntt commented 1 year ago

So how can i reset it?

Hi. Do you find the solution fix this problem?

mlab817 commented 2 months ago

did you guys find the solution to this problem? i want to clear the initialLinks because it messes with go_router when refreshed.

OziTFA commented 2 months ago

Any solution for this @water-user ?