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

FR: provide way to inhibit achievement popups #35

Closed
noolness opened this issue Mar 1, 2014 · 5 comments
Closed

FR: provide way to inhibit achievement popups #35

noolness opened this issue Mar 1, 2014 · 5 comments

Comments

@noolness
Copy link

noolness commented Mar 1, 2014

I have my own custom achievement dialogs that come up, and I want to disable the ones this library pops up. If I can't do that, I would want to be able to use something like setGravityForPopups, so they can be shown on the bottom of the screen. I don't want them to be shown at the top of the screen because that would negatively impact gameplay. Is there any way that could be done or any way it could be added?

@btco
Copy link

btco commented Mar 10, 2014

The plugin doesn't expose a way to do this, but it can be done by modifying the plugin code. What you want to do is call Games.setGravityForPopups right after the user signs in, probably from AndroidClient.cs

https://developer.android.com/reference/com/google/android/gms/games/Games.html#setGravityForPopups(com.google.android.gms.common.api.GoogleApiClient, int)

@btco btco closed this as completed Mar 10, 2014
@noolness
Copy link
Author

I was able to do it, by calling the native Java APIs directly. I think this might be a feature people commonly need though. Depending on the type of game, having an achievement on the top (rather than the bottom) could make the game unplayable. I have a workaround I used I can post here, just for other people to reference if it can't be added as a feature though.

@noolness
Copy link
Author

In AndroidClient.cs, I added the following line:
mGHManager.CallGmsApi("games.Games", null, "setGravityForPopups", (int)(80 | 1));

This made it so I could display the achievements on the bottom of the screen. It's a real hack job, but it was the last thing I needed to ship my game, and it was the easiest way to make sure the position was changed. Like I said it's okay if moving the popup or hiding the popup isn't a feature. It's just that I think it's a very common thing that people want to do.

@btco
Copy link

btco commented Mar 10, 2014

True... I'm reopening this as a feature request!

@btco btco reopened this Mar 10, 2014
@btco btco changed the title No way to stop achievement dialogs from showing up FR: provide way to inhibit achievement popups Mar 19, 2014
claywilkinson added a commit that referenced this issue Apr 6, 2017
Bug Fixes:
    * #1604 - Incompatible class error with play-services 10.2.
    * #370 - Fixed freeze/crash when calling Application.Quit().
New Features:
    * #35 - Added a method to inhibit achievment popups.
    * Google SignIn support for Auth Code, Id Token and email.
    * Updated to use GPGS C++ SDK version 2.3.
    * Added the Video Capture API.
Deprecated Features:
    * iOS Support will be winding down, ending iOS services in March 2018.
            See https://android-developers.googleblog.com/2017/04/focusing-our-google-play-games-services.html
    ** IMPORTANT **
      This is the last version with iOS support for GPGS.  Plan accordingly.
    ** IMPORTANT **

    * Quests are deprecated.

Change-Id: I023305eca9777ee134b3fbc9c1a350d3db115b21
@claywilkinson
Copy link

This feature was added in 0.9.37

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

No branches or pull requests

3 participants