Reputation: 2560
I currently struggle with Firebase Dynamic Links on Flutter. I followed the documentation and ended up with my own version:
final DynamicLinkParameters parameters = DynamicLinkParameters(
uriPrefix: 'https://myapp.page.link',
link: Uri.parse('https://myapp.page.link/'+Provider.of<FirebaseUser>(context).uid),
androidParameters: AndroidParameters(
packageName: 'com.me.myapp',
minimumVersion: 0,
),
iosParameters: IosParameters(
bundleId: 'com.me.myapp',
minimumVersion: '0',
appStoreId: '123456789',
),
socialMetaTagParameters: SocialMetaTagParameters(
title: 'Yay',
description: 'Click me'
),
);
final Uri dynamicUrl = await parameters.buildUrl();
Now I got few questions:
Upvotes: 2
Views: 2316
Reputation: 826
uriPrefix - This is your apps unique link which you can find on firebase console. Just browse to Firebase console > Dynamic link > and you get a link with something like https://xcvnm.app.goo.gl/ .That is the uriPrefix.
You should only use the required information in your app. All the fields are there for different behaviours and use case.
MinimumVersion The versionCode of the minimum version of your app that can open the link. If the installed app is an older version, the user is taken to the Play Store to upgrade the app. ( So if you are making a new app then you don't need to use this property.)
There is not much difference in short dynamic link
The correct place depends on your apps structure and your preference, so can't suggest that.
For more detail visit - https://firebase.google.com/docs/dynamic-links/android/create
Upvotes: 4