Code: Select all
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// Play Games Services
PlayGamesSdk.initialize(this);
GamesSignInClient gamesSignInClient = PlayGames.getGamesSignInClient(MainActivity.this);
gamesSignInClient.isAuthenticated().addOnCompleteListener(isAuthenticatedTask -> {
boolean isAuthenticated =
(isAuthenticatedTask.isSuccessful() &&
isAuthenticatedTask.getResult().isAuthenticated());
if (isAuthenticated) {
// Continue with Play Games Services
Toast.makeText(MainActivity.this, "Succesful!", Toast.LENGTH_SHORT).show();
} else {
// Disable your integration with Play Games Services or show a
// login button to ask players to sign-in. Clicking it should
// call GamesSignInClient.signIn().
Toast.makeText(MainActivity.this, "Failed!", Toast.LENGTH_SHORT).show();
}
});
///
}
Code: Select all
W/GooglePlayServicesUtil: Google Play services out of date for "MYPROJECT". Requires 213000000 but found 202414023
W/GoogleApiManager: The service for com.google.android.gms.internal.games_v2.zzx is not available: ConnectionResult{statusCode=SERVICE_VERSION_UPDATE_REQUIRED, resolution=null, message=null}
Code: Select all
E/eglCodecCommon: glUtilsParamSize: unknow param 0x000085b5
Nach diesem Fehler habe ich beschlossen, Play Games Services v1 (ältere Version) zu implementieren. Ich habe versucht, wie auf der Website https://developers.google.com/games/ser ... oid/signin (Google Docs) erklärt.
Aber ich habe einige Erklärungen dazu nicht verstanden. Gibt es da draußen eine Anleitung, die mehr erklärt? Danke!