【问题标题】:Is it possible to implement Firebase Dynamic Links on Huawei devices?是否可以在华为设备上实现 Firebase 动态链接?
【发布时间】:2020-06-18 11:23:46
【问题描述】:

我创建了使用动态链接的 android 应用程序

FirebaseApp.initializeApp(context)
Firebase.dynamicLinks
  .getDynamicLink(intent)
  .addOnSuccessListener(context) { successFunction(it) }
  .addOnFailureListener(context) { failureFunction(it) }

implementation 'com.google.firebase:firebase-dynamic-links-ktx:19.1.0'
implementation 'com.google.firebase:firebase-analytics:17.3.0'

我找到了通过 HMS Core 将 firebase-analytics 代理到华为设备的教程: https://developer.huawei.com/consumer/en/doc/development/Tools-Guides/30935655 但根本没有关于 firebase-dynamic-links 的信息

是否有可能在最新的华为设备上使用 Firebase 动态链接?

【问题讨论】:

  • 我不确定,但我怀疑 Firebase 归谷歌所有

标签: android firebase huawei-mobile-services huawei-developers


【解决方案1】:

纯华为设备(华为 P40)不能使用 Firebase 动态链接,在华为设备上可以使用"App Linking" 或第三个party kits 代替 Firebase 动态链接。 他们也有样品code

【讨论】:

    【解决方案2】:

    在没有GMS的华为手机上,开发者可以尝试使用app链接来实现同样的功能: https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-Guides/agc-applinking-introduction

    【讨论】:

      【解决方案3】:

      Firebase 动态链接无法在没有 GMS 的手机上运行。

      将调用 GMS 以重定向到链接。所以如果没有GMS,就无法处理重定向到链接。

      您可以在华为设备上使用App Linking

      【讨论】:

        【解决方案4】:

        截至日期(2020 年 10 月 20 日),Firebase 不支持链接到华为应用程序库,因为 Firebase 依赖于受最新华为设备限制的 Google Play 服务。

        另一方面,华为App Linking服务支持HMS(华为)、GMS(谷歌)以及iOS平台。不过,iOS 支持目前处于 Beta 阶段,因此我们应该期待它的最终版本。

        所有这一切意味着,与 Firebase 动态链接(仅 GMS 和 iOS)相比,华为 App Links 的覆盖范围(GMS、HMS、iOS)更多。

        进一步补充,branch.io(第三部分提供者,也在另一个答案中提到)支持所有这些平台 - GMS、HMS、iOS。

        【讨论】:

          【解决方案5】:

          没有。 Firebase 正式依赖于 Google Play 服务。您不应期望任何 Firebase 服务都可以在没有 Google Play 服务的手机上运行。即使某些 Firebase 服务目前确实可以正常工作,它们也可能随时停止工作,恕不另行通知并破坏您的应用。

          在我看来,您应该将所有 Firebase 服务视为无法在没有 Google Play 服务的手机上运行。试图找到黑客和解决方法只会导致以后难以调试问题。

          【讨论】:

            【解决方案6】:

            我很晚才回答这个问题,但是我今天在使用 firebase 动态链接开发 Ionic 应用程序时遇到了这个问题。 由于华为设备可能不支持谷歌服务。所以我刚刚下载了 Google Play 商店,动态应用程序运行良好/

            下载 Google Play 商店(这将有助于使用 Google 服务和 firebase 动态链接将完美运行)。

            【讨论】:

            • 您不能让您的用户下载非官方版本的 Google Play 服务以将其安装到他们的设备上。
            猜你喜欢
            • 2020-12-02
            • 2021-10-08
            • 1970-01-01
            • 2021-10-30
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            • 2019-05-29
            • 1970-01-01
            相关资源
            最近更新 更多