如何在firebase邀请中访问接收端的其他转介参数
这是发送端如何在firebase邀请中访问接收端的其他转介参数,firebase,firebase-dynamic-links,Firebase,Firebase Dynamic Links,这是发送端 private void onInviteClicked() { Map<String, String> referralParams = new HashMap<String, String>(); referralParams.put("Name", "Devesh Agrawal"); referralParams.put("id", "1000"); Intent intent = new AppInviteInvi
private void onInviteClicked() {
Map<String, String> referralParams = new HashMap<String, String>();
referralParams.put("Name", "Devesh Agrawal");
referralParams.put("id", "1000");
Intent intent = new AppInviteInvitation.IntentBuilder(getString(R.string.invitation_title))
.setMessage(getString(R.string.invitation_message))
.setDeepLink(Uri.parse(getString(R.string.invitation_deep_link)))
.setCustomImage(Uri.parse(getString(R.string.invitation_custom_image)))
.setCallToActionText(getString(R.string.invitation_cta))
.setAdditionalReferralParameters(referralParams)
.build();
startActivityForResult(intent, REQUEST_INVITE);
}
我有以下疑问:
请在这方面帮助我。我很快放弃了这个想法,并假设推荐参数还有其他用途:-(但我通过深度链接获得了我的数据: 找到此额外信息: “@droidwala在与团队交谈后,似乎不再需要此方法,并将很快被删除” 寄件人
Uri deepLink = Uri.parse(getString(R.string.invitation_uri));
Uri deepLinkPlus = Uri.withAppendedPath(deepLink, family.getUid());
Intent intent = new AppInviteInvitation.IntentBuilder(...)
.setDeepLink(deepLinkPlus);
在AppInvite.AppInviteApi.getInvitation回调中
Uri deepLink = Uri.parse(AppInviteReferral.getDeepLink(intent));
String uid = deepLink.getLastPathSegment();
你知道如何在接收端获取额外的推荐参数了吗?我注意到,对于接收端来说,如果是通过短信发送的,短信中显示的链接是Firebase网站上显示的链接,而不是我提供的深层链接。为什么呢?谷歌会在以后根据新用户的电话号码添加深层链接?
Uri deepLink = Uri.parse(AppInviteReferral.getDeepLink(intent));
String uid = deepLink.getLastPathSegment();