【问题标题】:Using Android/Firebase Invite System使用 Android/Firebase 邀请系统
【发布时间】:2017-04-03 19:06:16
【问题描述】:

我今天使用 Android 实现了 AppInviteInvitation,并且可以成功发送邀请,但是当收件人尝试按下邀请中的安装按钮时,他们会在设备浏览器中被带到 plus.google.com。

我做错了吗?

  private void onInviteClicked() {
    Intent intent = new AppInviteInvitation.IntentBuilder("Invite")
            .setMessage("Download")
            .setCallToActionText("Install")
            .build();
   final int REQUEST_INVITE = 0;
    startActivityForResult(intent, REQUEST_INVITE);
 }

【问题讨论】:

  • 我也有同样的问题,Google Plus 链接返回 404 错误。只有在我的 Android 手机上打开的短信邀请才能将我带到 Play 商店。 G+ 上的所有电子邮件链接都失败并显示 404。你搞清楚了吗?

标签: android firebase google-app-invites


【解决方案1】:

尝试将深层链接属性设置为您的应用名称。

.setDeepLink(Uri.parse(getString(R.string.app_name)))

在将上述语句添加到 Intent 构建器之前,我在 Google Plus 链接上收到 404 错误。添加语句后,邀请的行为符合预期。我没有在我的应用程序中使用深层链接,尽管它们是通过 Google Play 控制台为应用程序启用的。

【讨论】:

  • 确实有帮助!非常感谢!
  • 我可以使用 rest api 创建这个邀请链接吗?
猜你喜欢
  • 2020-12-20
  • 2018-04-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-06-12
  • 1970-01-01
  • 2020-01-16
相关资源
最近更新 更多