I am able to log in using helper classes from BaseGameUtils: https://github.com/playgameservices/android-basic-samples/tree/master/BasicSamples/libraries/BaseGameUtils/src/main/java/com/google/example/games/basegameutils
How can I get the ID of the player just logged in?
gameHelper.setConnectOnStart(false);
gameHelper.setMaxAutoSignInAttempts(0);
gameHelper.setup(gameHelperListener);
final GameHelper.GameHelperListener gameHelperListener = new GameHelper.GameHelperListener() {
@Override
public void onSignInFailed() {
}
@Override
public void onSignInSucceeded() {
// I want to get the player ID here
}
};
Login code:
try {
runOnUiThread(new Runnable() {
@Override
public void run() {
gameHelper.beginUserInitiatedSignIn();
}
});
} catch (Exception e) {
}
Games.Players
is deprecated. Please check my answer here: stackoverflow.com/questions/26413589/… – Martin Braun