[英]Firebase Dynamic Link on Flutter
I currently struggle with Firebase Dynamic Links on Flutter.我目前在 Flutter 上使用 Firebase 动态链接。 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:现在我有几个问题:
uriPrefix - This is your apps unique link which you can find on firebase console. uriPrefix - 这是您的应用程序唯一链接,您可以在 firebase 控制台上找到它。 Just browse to Firebase console > Dynamic link > and you get a link with something like https://xcvnm.app.goo.gl/ .That is the uriPrefix.
只需浏览到 Firebase 控制台 > 动态链接 > 就会得到一个类似https://xcvnm.app.goo.gl/的链接。这就是 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.最小版本 可以打开链接的应用程序的最低版本的 versionCode。 If the installed app is an older version, the user is taken to the Play Store to upgrade the app.
如果安装的应用程序是旧版本,用户将被带到 Play 商店升级应用程序。 ( 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有关更多详细信息,请访问 - https://firebase.google.com/docs/dynamic-links/android/create
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.