Comments (2)
this is a real issue, please someone check this.
We need to clear the initialLink after reading it!
from uni_links.
As it says in the README under Usage about the Initial Link:
Returns the link that the app was started with, if any.
I should add that getInitialLink
(or getInitialUri
) may only return a non-null value if the app was cold started and not resumed from the background.
So... your app was cold started...
Your user may start your app via the icon on their home screen. In this case the app will not have been started via an external link, so calling getInitialLink
will return null
.
On the other hand - your users may start your app via a link from another app, like a browser. In that case calling getInitialLink
will return that specific link - something like com.my-domain.my-app-scheme://whatever?key1=param1&key2=param2
or https://my-fancy-app-domain.com.au/path/to/whatever/?auth_key=uuid&user_id=uuid
.
This link is not meant and will not change throughout your app's life, until it is terminated - either by the system or by the user, force quitting it. It should not be cleared or reset. You should listen to changes via getLinksStream or getUriLinksStream, which notifies its listeners when a new link arrives. The listeners are notified when the app is resumed from the background, meaning the app is no longer terminated, but "minimised", while other apps are in the foreground and switch to your already running app.
I've written in the README a bit more about app start from a link.
This is how the two platforms are made. I'm open for discussion if I'm wrong and either of the two platforms - Android or iOS - support multiple entry points to a cold started app. The plugin is trying to give Flutter developers access to these details in the most convenient way. In some cases your best approach is to implement your own native solution (using Swift, Objective-C, Kotlin or Java), that is tailored specifically to your app's needs.
I hope this makes sense?
Feel free to re-open if needed.
Edit: added more clarifications.
from uni_links.
Related Issues (20)
- applink not working on ios HOT 3
- IOS universal link does not work in chrome. HOT 3
- No more maintained? HOT 2
- How to get queryParams in Deeplink? HOT 1
- Build fail with AGP 8.0 HOT 2
- URI Link with '&' in the link won't recognized as uni link HOT 1
- Does not trigger with a subdomain on iOS HOT 1
- Android : Can't open app with deeplink in chrome. HOT 6
- Unable to get deep link when user first time installed the app via GooglePlay HOT 3
- Test deep link during development by clicking on something HOT 1
- Namespace not specified. Specify a namespace in the module's build file HOT 4
- Not working with Flutter add-to-app in iOS HOT 1
- Can't get it to work on Android with subdomain HOT 6
- [Android] When i use the universal link to open Android, avoid reload the full app.
- getInitialUri doesn't work for iOS (16.6.1) HOT 1
- uni_link worked for me on Android but I couldn't get it to work on IOS HOT 1
- Migrate to `package:web` to support WASM HOT 1
- NOt compile with gradle 8.3 HOT 2
- Please update compileSdkVersion HOT 2
- issue on android 12 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uni_links.