gpt4 book ai didi

android - Google Play 游戏 - Activity 自动调用 beginUserInitiatedSignIn()

转载 作者:塔克拉玛干 更新时间:2023-11-02 22:45:45 26 4
gpt4 key购买 nike

我最近更新了我的应用程序中的 Google Play 服务库以使用新的 Google API。这样做时,每当我在未登录的情况下首次启动 Activity(它扩展了 BaseGameActivity)时,Activity 会自动出现登录对话框。

我没有在任何地方进行任何 beginUserInitiatedSignIn() 调用。这很烦人 - 有解决办法吗?

这是一个日志:

03-02 21:13:08.067: W/PopupManager(12332): You have not specified a View to use as content view for popups. Falling back to the Activity content view which may not work properly in future versions of the API. Use setViewForPopups() to set your content view.
03-02 21:13:08.137: D/dalvikvm(12332): GC_FOR_ALLOC freed 223K, 3% free 9306K/9560K, paused 16ms, total 16ms
03-02 21:13:08.197: I/Adreno-EGL(12332): <qeglDrvAPI_eglInitialize:320>: EGL 1.4 QUALCOMM Build: I0404c4692afb8623f95c43aeb6d5e13ed4b30ddbDate: 11/06/13
03-02 21:13:08.228: D/OpenGLRenderer(12332): Enabling debug mode 0
03-02 21:13:39.771: W/PopupManager(12432): You have not specified a View to use as content view for popups. Falling back to the Activity content view which may not work properly in future versions of the API. Use setViewForPopups() to set your content view.
03-02 21:13:39.891: D/dalvikvm(12432): GC_FOR_ALLOC freed 227K, 3% free 9303K/9560K, paused 17ms, total 17ms

最佳答案

这是默认行为 this issue .

FAQ状态:

[4] Why is GameHelper/BaseGameActivity attempting to sign in on application startup?

The default behavior of BaseGameActivity and GameHelper is to show the user the sign-in flow (consent dialogs, etc) as soon as your application starts. Naturally, once the user signs in for the first time, they won't see the consent flow again, so it will be a seamless experience. It is important for the user to sign in as early as possible so your application can take advantage of the Google Play Games API right away (for example, saving the user's progress using Cloud Save, unlocking achievements, etc). If the user cancels the sign-in flow, BaseGameAcitivity/GameHelper will remember that cancellation. If the total number of cancellations reaches a predefined maximum (by default, 3), the user will no longer be prompted to sign in on application startup. If that happens, they can still sign in by clicking your application's Sign In button, if you provide one.

[5] I don't like the new "auto sign in" feature of GameHelper. How can I disable it?

To disable this feature and return to the old behavior, you can edit GameHelper.java and set the DEFAULT_MAX_SIGN_IN_ATTEMPTS constant to 0, or call GameHelper.setMaxAutoSignInAttempts(0) at runtime, before calling GameHelper.setup() (or, correspondingly, from your Activity's onCreate method).

关于android - Google Play 游戏 - Activity 自动调用 beginUserInitiatedSignIn(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22133480/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com