将 huawei auth 添加到使用 firebase auth 的退出应用程序

Adding huawei auth to exiting app that uses firebase auth

我有一个现有的 flutter 应用程序,它使用 firebase 身份验证、MLVision 进行人脸识别和云消息推送通知。我正在使用颤振。我现在的问题是如何集成华为授权。我是这个华为集成的新手。我还没有尝试过,我只是想在开始之前知道。

根据我从一些 post 那里读到的内容。我需要整合 华为移动服务(HMS), 华为帐号服务和AppGallery Connect认证服务。 对于具有 google 服务的非华为 phone,我可以通过不同的按钮同时使用 firebase 和 huawei auth 进行身份验证,对吗?但是没有google服务的华为phones呢?

  1. 应用程序如何知道?所以它可以隐藏 firebase 登录或 运行 huawei only scripts for authenticaion?
  2. MLVision 需要 google 播放服务。 huawei kit有没有一样的?
  3. 如果它是一个大的代码修改,使用HMS,auth,Pushkit并且没有google服务脚本来创建仅适用于华为phone的应用程序会更容易吗?

How will the app know? So it can hide the firebase login or run huawei only scripts for authenticaion?

可以参考这个插件:https://pub.dev/packages/google_api_availability

HMS也将在近期提供判断HMS可用性的插件。届时也可以使用插件

MLVision needs google play services. Is there the same for huawei kit?

HMS的ML Kit也提供了人脸识别功能

FLutter平台请参考以下link:https://developer.huawei.com/consumer/en/doc/development/HMS-Plugin-Guides/body-related-services-0000001074129424?ha_source=hms1

If its a large revision of code, will it be easier to create the app only for huawei phone with HMS, auth, Pushkit and with no google services script.

HMS插件接口没有映射到GMS接口,实现逻辑不同。因此,无法实现一对一的映射。涉及的套件较多,兼容性开发会有很大变化。建议单独开发,提高效率。