Understand Dynamic Links Firebase
I would like to understand better Firebase Dynamic Links because i am very new to this subject.
What i would like to know :
FirebaseDynamicLinks.instance.getInitialLink()
is supposed to return "only" the last dynamic link created with the "initial" url (before it was shorten) ?Or why
FirebaseDynamicLinks.instance.getInitialLink()
doesn't take aString url
as a parameter ?FirebaseDynamicLinks.instance.getDynamicLink(String url)
doesn't read custom parameters if the url was shorten, so how can we retrieve custom parameters from a shorten link ?
My use case is quite simple, i am trying to share an object through messages in my application, so i want to save the dynamic link in my database and be able to read it to run a query according to specific parameters.
Answer
FirebaseDynamicLinks.instance.getInitialLink()
returns the link that opened the app and if the app was not opened by a dynamic link, then it will return null.Future<PendingDynamicLinkData?> getInitialLink()
Attempts to retrieve the dynamic link which launched the app.
This method always returns a Future. That Future completes to null if there is no pending dynamic link or any call to this method after the the first attempt.
FirebaseDynamicLinks.instance.getInitialLink()
does not accept a string url as parameter because it is just meant to return the link that opened the app.Looks like there's no straightforward answer to getting the query parameters back from a shortened link. Take a look at this discussion to see if any of the workarounds fit your use case.
Related Questions
- → How can I query Firebase for an equalTo boolean parameter?
- → How can I access nested data in Firebase with React?
- → Firebase simple blog (confused with security rules)
- → Removing item in Firebase with React, re-render returns item undefined
- → AngularJS Unknown Provider Error (Firebase & AngularFire)
- → How do you pass top level component state down to Routes using react-router?
- → "this" is null in firebase query function in reactjs
- → Angular Module Failed to Load
- → Multiple dex files define Lcom/google/android/gms/internal/zzrx;
- → Joining Firebase tables in React
- → How can I make add firepad to my reactjs project?
- → How to use Cloud Functions for Firebase to prerender pages for SEO?
- → React.js component has null state?