将Google登录功能集成到Android应用中 [英] Integrating Google Sign-In into Android App

查看:247
本文介绍了将Google登录功能集成到Android应用中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在关注 https://developers.google.com/identity /sign-in/android/start-integrating 指南,将google登录功能集成到我的android应用中.

I am following https://developers.google.com/identity/sign-in/android/start-integrating guide to integrate google Sign-in into my android app.

我正在研究一个项目,在该项目中我无法将配置文件放入android项目的app文件夹中.我想知道是否还有其他选择.我可以将 API密钥作为元数据标签作为元数据标签放在 AndroidManifest.xml 中,而不是将google-services.json放入应用程序中Google Map API允许的目录(参考 https://developers.google.com/maps/documentation/android/start#add_the_api_key_to_your_application )吗?

I am working on a project where Its not possible for me to put configuration file into app folder of android project. I want to know is there any alternative for that. Can I put API key in the AndroidManifest.xml as a meta-data tag under application tag instead of putting google-services.json in app directory as allowed with Google map API (reference https://developers.google.com/maps/documentation/android/start#add_the_api_key_to_your_application) ?

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

I also want to know where the configuration file (google-services.json) is used in android app because its not present in generated apk?

推荐答案

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

There is no need for putting meta-data tag containing API key for Google plus sign in Android api. Just need to take care that correct SHA-1 key is put in credentials.

无需放置配置文件即可使用Google plus android api. android应用程序根本不使用它.

There is no need to put configuration file for using Google plus android api. Its not used by android app at all.

这篇关于将Google登录功能集成到Android应用中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆