使用上传密钥而不是Google Play应用签名密钥测试游戏服务 [英] Testing Games Services using upload key instead of Google Play App signing key

查看:90
本文介绍了使用上传密钥而不是Google Play应用签名密钥测试游戏服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前已设置GPGS并正在为我的应用程序工作.使用我的上传密钥调试我的应用程序时,某些功能出现问题.我按照此处的步骤操作: https://stackoverflow.com/a/45270329/5434860 并能够登录Google同时使用Google保留在安全服务器上的带有安全应用程序签名密钥"签名的应用程序,并且能够使用由我的上传密钥"签名的应用程序登录. (我那里有两个OAuth 2.0客户端ID.一个用于生产,一个用于调试)

I currently have GPGS set up and working for my app. I'm having problems with some features while debugging my app using my upload key. I followed the steps here: https://stackoverflow.com/a/45270329/5434860 and am able to sign into Google while using the app signed with the secure "app signing key" that Google keeps on a secure server and am able to sign in using the app signed with my "upload key". (I have two OAuth 2.0 client IDs in there. One for production and one for debugging)

我的问题类似于测试Google Play游戏在使用上传密钥签名的应用上 Android RealTimeMultiplayer onRoomCreated获取状态2:STATUS_CLIENT_RECONNECT_REQUIRED .虽然我可以使用使用上传密钥签名的应用程序登录,但实际上我无法完全测试我使用的其他游戏服务.这两个问题都没有解决.

My problem is similar to Test Google Play Games on app signed with upload key and Android RealTimeMultiplayer onRoomCreated getting status 2 : STATUS_CLIENT_RECONNECT_REQUIRED. While I can sign in using the app signed with my upload key, I cannot actually fully test the different games services I use. Nether of those two questions has been solved.

例如,在尝试测试实时多人游戏时,我会在onRoomCreated中获得statusCode为2(CLIENT_RECONNECT_REQUIRED).仅当我使用使用我的上传密钥签名的应用程序时,才会发生这种情况.要对此进行全面测试,我必须在Google Play控制台上创建一个内部发行版.当我这样做时,多人游戏,成就和排行榜都可以正常运行,并且我能够对其进行测试.

For instance, while trying to test Real Time Multiplayer, I'll get a statusCode of 2 (CLIENT_RECONNECT_REQUIRED) in onRoomCreated. This only happens when I'm using the app signed with my upload key. To fully test this I have to create an internal release on my Google Play Console. When I did that, multiplayer, achievements, and leaderboards were fully functional and I was able to test them.

我还取消了反盗版,所以这不是问题.如果我从console.developers.google.com删除OAuth凭据,它将停止登录,但是当我重新添加OAuth凭据时,它仍然无法完全正常运行,因为我唯一可以做的就是登录.

I also have anti-piracy off, so that isn't the problem. If I remove the OAuth crediential from console.developers.google.com it stops being able to sign in, but when I add it back it still isn't fully functional as the only thing I can do is sign in.

当前,我的Game Service项目已经发布,并且我试图允许两个SHA1键可以访问它.虽然我可以使用上传密钥登录,但我希望能够完全测试我的应用程序,而不必每次都创建一个新的内部发行版,因此使用正确的密钥对其进行了签名.

Currently, my Game Service project is published and I am trying to allow two SHA1 keys to be able to access it. While I am able to login using the upload key, I would like to be able to fully test my app without having to create a new internal release each time so it's signed with the correct key.

我真的希望能够测试游戏服务,而不必每次都将其上载到Google Play控制台.

I would really like to be able to test Games Services without uploading it to Google Play Console every time.

推荐答案

一个月前,我与google联系了有关此问题的信息,尽管他们花了一些时间才联系我,但我终于找到了解决方案.

A month ago I contacted google about this problem and although it took awhile for them to get back to me, I finally have a solution.

我的问题是我在console.developers.google.com上手动创建了OAuth 2.0客户端ID.您实际上应该做的是转到游戏服务,转到链接的应用程序"并添加另一个链接的应用程序.您将选择与其他链接应用程序相同的应用程序,但是对于SHA1密钥,您将放置任何您想做的密钥.

My problem was that I manually created the OAuth 2.0 Client ID at console.developers.google.com. What you are actually supposed to do is go to your Game Service, go to Linked Apps and add another linked app. You will choose the same app as you did for your other Linked App, but for the SHA1 key, you will put whatever key you want to do.

因此,当您想添加另一个可以用来测试的SHA1密钥时,请勿手动创建OAuth 2.0客户端ID.转到游戏服务中的链接应用程序,然后将其链接!

So when you want to add another SHA1 key that you are able to test with, DO NOT manually create the OAuth 2.0 Client ID. Go to linked apps in your game service and link the app!

这篇关于使用上传密钥而不是Google Play应用签名密钥测试游戏服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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