当前位置: 首页 > 知识库问答 >
问题:

Android:Firebase动态链接始终指向playstore URL,即使应用程序已安装

赏高格
2023-03-14

我试图将Firebase动态链接集成到Android应用程序中,但问题是,即使安装了应用程序,动态链接也会带我去播放商店页面从播放商店下载应用程序。我发送了动态链接的电子邮件。然后在Android智能手机,我打开电子邮件,点击动态链接,它去玩商店总是...有没有人面临同样的问题并有同样的解决方案。

当我在https://firebase.google.com/docs/app-indexing/android/test 动态链接很好地连接到应用程序。因为应用程序已安装。

我在我的应用程序中添加了SHA-1和SHA-256密钥。

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="io.chillingchat.android">

<uses-permission android:name="android.permission.INTERNET" />

<application
    android:allowBackup="true"
    android:icon="@drawable/adv"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:supportsRtl="true"
    android:theme="@style/AppTheme"
    >
    <activity
        android:name="io.chillingchat.android.view.MainActivity"
        android:label="@string/app_name">

    </activity>

    <activity
        android:name="io.chillingchat.android.view.AuthActivity">

        <intent-filter android:autoVerify="true">
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT"/>
            <category android:name="android.intent.category.BROWSABLE"/>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
            <data
                android:host="chillingchat.io"
                android:scheme="https"/>
            <data
                android:host="chillingchat.io"
                android:scheme="http"/>
        </intent-filter>
    </activity>


</application>
actionCodeSettings = ActionCodeSettings.newBuilder()
            // URL you want to redirect back to. The domain (www.example.com) 
            // URL must be whitelisted in the Firebase Console.
            .setUrl("https://chillingchat.page.link/in")
            // This must be true
            .setHandleCodeInApp(true)
            .setAndroidPackageName(
                    "io.chillingchat.android",
                    true, /* installIfNotAvailable */
                    "16"    /* minimumVersion */)
            .build();

共有1个答案

澹台蕴藉
2023-03-14

我终于解决了这个可怕的问题。

在动作代码设置中,

.setAndroidPackageName(
                "io.chillingchat.android",
                true, /* installIfNotAvailable */
                "16"    /* minimumVersion */)

改变为

.setAndroidPackageName(
                "io.chillingchat.android",
                false, /* installIfNotAvailable */
                "16"    /* minimumVersion */)

但我不知道为什么要将true改为false*installIfNotAvailable*选项使其工作。。

 类似资料:
  • 我有一个React Native应用程序与动态链接。安装应用时,动态链接将正确打开。但是当应用程序没有安装时,我想打开一个特定的网站,而不是AppStore预览页面。关于react-inal-Firebase文档,iOS上的"setFallbackUrl"方法应该处理这个问题。但它根本不起作用... 我使用的是react native firebase 5.2.1 以下是我创建动态链接的代码: 我

  • 我已经在我的设备上本地开发了一个android应用程序(应用程序还没有在android play商店上)。我有以下逻辑在主体活动中获得深度链接。 我用Firebase控制台建立了一些动态链接,并在手机浏览器中打开。但它不是打开我的应用程序并到达行字符串deepLink=appinvitereferral.getdeeplink(intent); 我在清单文件中有意图过滤器。

  • 我遵循了Firebase动态链接文档中的所有步骤: 已将团队Id添加到firebase控制台 已添加自定义域 启用的关联域 已添加到信息URL方案 然而,当我点击动态链接时,它总是重定向到AppStore,而不是应用程序。我已经尝试了不间断的应用程序,重新启动手机和重新安装。如何让这个深度链接发挥作用? 附注:我的应用程序还没有发布到AppStore。

  • 有人试用过新的Firebase SDK for Unity吗(https://firebase.google.com/docs/unity/setup)? 当我尝试集成动态链接功能时,当有邀请时,它会使应用程序崩溃。 我创建了一个全新的项目与最低设置(https://firebase.google.com/docs/dynamic-links/unity)为Android添加动态链接到我的项目。当

  • 我想为我的cordova android应用程序启用应用程序索引,如下所述:https://developers.google.com/app-indexing/webmasters/app 不幸的是,我找不到留档如何做一个科尔多瓦的应用程序。有一个插件收听和广播意向,但我不认为这将帮助我在这种情况下:https://github.com/Initsogar/cordova-webintent 我

  • 主要内容:静态链接库,动态链接库,总结我们知道,C、C++程序从源文件到生成可执行文件需经历 4 个阶段,分别为预处理、编译、汇编和链接,本节将重点围绕链接阶段,对静态链接库和动态链接库做详细的讲解。 有关链接操作的具体细节,感兴趣的读者可阅读《 到底什么是链接,它起到了什么作用?》和《 符号——链接的粘合剂》这两节。总的来说链接阶段要完成的工作,就是将同一项目中各源文件生成的目标文件以及程序中用到的库文件整合为一个可执行文件。 通过