Popup notification for achievements in Play Services v2

13 views Asked by At

In my Android app, I'm implementing Achievements with the Play Services. I noticed that, although my achievements were correctly unlocked, no default popup was shown to the user when they achieved it. I've seen that with v1 of the Play Services implementation, this was fixed with something like this:

GamesClient gamesClient = Games.getGamesClient(this, GoogleSignIn.getLastSignedInAccount(this));
gamesClient.setViewForPopups(act.findViewById(android.R.id.content));
gamesClient.setGravityForPopups(Gravity.TOP | Gravity.CENTER_HORIZONTAL);

But in v2, GamesClient can no longer be recovered like that. So I would like to know how would it be done in v2 or if it's no longer possible for some reason. Here my version of the library in the Gradle:

implementation "com.google.android.gms:play-services-games-v2:19.0.0"
0

There are 0 answers