我的baseactivity oncreate()中有以下代码
// Google Play Services
mGoogleSignInClient = GoogleSignIn.getClient(this, new GoogleSignInOptions
.Builder(GoogleSignInOptions.DEFAULT_GAMES_SIGN_IN)
.build());
然后我把这个称为子类
startActivityForResult(mGoogleSignInClient.getSignInIntent(), RC_SIGN_IN);
我用下面的代码解锁一个成就
GoogleSignInAccount googleSignInAccount = GoogleSignIn.getLastSignedInAccount(activity);
if (googleSignInAccount != null) {
Games.getAchievementsClient(activity, googleSignInAccount)
.unlockImmediate(id);
}
它工作,但我看不到任何“成就已解锁”弹出窗口。
最佳答案
这段代码解决了我的问题
Games.getGamesClient(activity, googleSignInAccount).setViewForPopups(popupView);