Google Play游戏,Firebase和新的Google登录功能 [英] Google Play Games, Firebase and the new Google Sign-in

查看:177
本文介绍了Google Play游戏,Firebase和新的Google登录功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的游戏是使用Google Play游戏和Firebase(对于排名系统,因为不幸的是不能降低Google排行榜的分数)。
$ b $ p

过去我使用已弃用的方式通过 Plus.AccountApi.getAccountName 和朋友登录到Firebase。



转换为新的Google登录,但显然不能与Google Play游戏结合使用:

  Auth.GOOGLE_SIGN_IN_API不能用于Games.API 

我的整个目标是摆脱Google+依赖Google Play游戏不再需要它)和GET_ACCOUNTS权限。



如何在没有Google+和GET_ACCOUNTS的情况下登录到Firebase,而无需新的Google登录?我可以吗?也许创建两个独立的GoogleApiClient会是一个解决方案吗?解决方案

那么,我简单地创建了两个独立的GoogleApiClient:一个用于Google Play游戏,另一个用于Firebase(使用新的Google登录)。我看到这种方法没有问题,我摆脱了Google+依赖& GET_ACCOUNTS权限。


My game is using Google Play Games and Firebase (for Rankings System, because unfortunately one cannot reduce the score in Google Leaderboards).

In the past I used the deprecated way to sign-in to Firebase via Plus.AccountApi.getAccountName and friends...

So I tried to convert to the new Google Sign-in, but apparently it cannot be used in conjuction with Google Play Games:

Auth.GOOGLE_SIGN_IN_API cannot be used with Games.API

My whole goal was/is to get rid of Google+ dependency (as Google Play Games doesn't require it anymore) and the GET_ACCOUNTS permission.

How can I sign in to Firebase without Google+ and GET_ACCOUNTS - and without the new Google Sign-in? Can I? Perhaps creating two separate GoogleApiClients would be a solution?

解决方案

Well, I simply ended up creating two separate GoogleApiClients: one for Google Play Games, and another for Firebase (using the new Google sign-in). I see no problems with this approach, and I got rid of the Google+ dependency & GET_ACCOUNTS permission.

这篇关于Google Play游戏,Firebase和新的Google登录功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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