android - Firebase 动态链接总是返回已取消

标签 android firebase deep-linking firebase-dynamic-links

我正在为我的应用使用动态链接。

我已逐步按照教程进行操作,并且可以通过单击 facebook 上发布的链接来打开应用程序。

但是当我调用 getInvitation 时,AppInviteInvitationResult 的状态总是 CANCELED。

    AppInvite.AppInviteApi.getInvitation(mGoogleApiClient, this, false).setResultCallback(
            new ResultCallback<AppInviteInvitationResult>() {
                @Override
                public void onResult(@NonNull AppInviteInvitationResult result) {
                    if (result.getStatus().isSuccess()) {
                        // Extract deep link from Intent
                        Intent intent = result.getInvitationIntent();
                        String deepLink = AppInviteReferral.getDeepLink(intent);

                        // [END_EXCLUDE]
                    } else {
                        Log.d("StartActivity", "getInvitation: no deep link found.");
                    }
                }
            });

进入调试,我可以看到 result.getStatus() 返回 CANCELED,但点击 lick 可以正确打开应用程序。

我哪里错了?

编辑:我使用的链接是: https://wft4z.app.goo.gl/?link=https://aqld.it/testlink/112972&al=aqld://test/about?params%3D17363&apn=com.project.mydeeplink

list 上的过滤器:

最佳答案

当没有收到 Intent 时,状态被取消。我也在想同样的事情,结果发现我在 firebase 网页中创建的链接是错误的。我写了一些关于如何调试 url 问题的想法作为对另一个问题的回答。如果您遇到与我相同的问题,他们应该会有所帮助:

https://stackoverflow.com/a/37615175/4025606

关于android - Firebase 动态链接总是返回已取消,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37633322/

相关文章:

java - 错误:无法解决:com.android.support:support-v4:26.1.0

angularjs - Cordova/Ionic Firebase Auth 持久登录

android - 带有 android :autoVerify ="true" - never verified at installation, 默认应用程序链接的 Intent 过滤器不起作用

ios - 如何在 Swift 应用程序中使用自定义 URL 打开另一个 Swift 应用程序

android - 无法使用 usb 直通 Virtualbox 将访客的 adb 连接到硬件设备

android - 防止或避免 Android 应用程序中的多次点击(Kotlin 语言)

java - 图像文件无法使用改造 2 后方法发送到服务器

javascript - 我想帮助在 Angular 5 中将 Firebase 数据库对象更改为数组

android - GMS 服务更新会终止 Android 设备中当前正在运行的依赖于 GMS 的进程/服务

Android 深层链接到服务?