将 Google 登录集成到 Android 应用程序

Integrating Google Sign-In into Android App

我正在按照 https://developers.google.com/identity/sign-in/android/start-integrating 指南将 google 登录功能集成到我的 android 应用程序中。

我正在做一个项目,我无法将配置文件放入 android 项目的 app 文件夹中。我想知道有没有其他选择。我可以将 API key 作为 meta-data 放在 AndroidManifest.xml 中吗] 标记在应用程序标记下,而不是像 Google 映射 API 允许的那样将 google-services.json 放在应用程序目录中(参考 https://developers.google.com/maps/documentation/android/start#add_the_api_key_to_your_application) ?

我还想知道 android 应用中配置文件 (google-services.json) 的使用位置,因为它不存在于生成的 apk 中?

不需要将包含 API 键的元数据标签放入 Google 加号中 Android api。只需要注意将正确的 SHA-1 密钥放入凭据中即可。

使用Google加androidapi不需要配置文件。 android 应用根本不使用它。