Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't show leaderboard after authentication #58

Closed
MhdBassam opened this issue Mar 15, 2014 · 3 comments
Closed

Can't show leaderboard after authentication #58

MhdBassam opened this issue Mar 15, 2014 · 3 comments

Comments

@MhdBassam
Copy link

Hi there,

Plugin Build: GooglePlayGamesPlugin-0.8.01
the project contains also Facebook SDK 5.0.4 and Admob SDK.

My app's UI contains two buttons:

  • the first one authenticate local player and post new score.
    public void OnAuthenticateAndPostClick()
    {
        PlayGamesPlatform.Instance.Authenticate(PlayGamesPlatform.Instance.localUser, (bool authSuccess) => {
            ShowMsg("Inside Authenticate callback");
            if (authSuccess)
            {
                ShowMsg("Authentication success");
                PlayGamesPlatform.Instance.ReportScore(1, "LeaderboardId", (bool postSuccess) => {
                    ShowMsg("Inside ReportScore callback");
                    if (postSuccess)
                    {
                        ShowMsg("ReportScore success");
                    }
                    else
                    {
                        ShowMsg("ReportScore failed");
                    }
                });
            }
            else
            {
                ShowMsg("Authenticate failed");
            }
        });
    }
  • and the second one shows leaderboard by id.
    public void OnShowLeaderboardClick()
    {
        PlayGamesPlatform.Instance.ShowLeaderboardUI("LeaderboardId");
    }

where ShowMsg(...) is a simple function to show text on screen.

The problem happens after calling OnAuthenticateAndPostClick(), log shows that ReportScore's callback didn't call at all (i.e. last log message is "Authentication success"), and ShowLeaderboardUI not work till next launch of the app.

@javocsoft
Copy link

The same happens to me in one Android game that i am doing, just after a successful login in Google Play, when i try to show the leaderboard or the achievements, sometimes do not show nothing and sometimes yes. Testing it more, i discovered that when this happens, if i quit the application using the home button and afterwars i recover it from the open tasks, the leaderboard/achievement window shows correctly. It is like the window could not be fully loaded.

@MhdBassam
Copy link
Author

I replaced this plugin with Prime31's plugin and every thing works fine
I'll like to use google's official plugin in my future games, but of course after resolving this problem
thanks.

@Baronium
Copy link

This has been related to #25 and is fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants