android-basic-samples icon indicating copy to clipboard operation
android-basic-samples copied to clipboard

Games.getPlayersClient().getCurrentPlayer task never completes/running

Open aditya2 opened this issue 6 years ago • 1 comments

I can successfully authenticate my user with google play games signin and get a valid GoogleSignInAccount but now i m trying to get the IconImage of currently signined in player using the code below

            if(pC != null) {
                pC.getCurrentPlayer().addOnCompleteListener(this, new OnCompleteListener<Player>() {
                    @Override
                    public void onComplete(@NonNull Task<Player> task) {
                        if(task.isSuccessful()){
                            Log.d("SomeTag", "onComplete: " + task.getResult().getIconImageUri().toString());
                        }else {
                            Log.d("SomeTag", "onComplete: " + task.getException().getMessage());
                        }
                    }
                });
            }

but this getCurrentPlayer() task never printing anything in my logcat no error, nothing, i've also tried OnFailureListener and OnSuccessListner but same problem, i m searching for the cause for like 3 days now but failed. Pls help ASAP

aditya2 avatar Apr 09 '18 14:04 aditya2

We see this behaviour too on some devices. Any reason for this?

voxelbustersold avatar Feb 07 '19 15:02 voxelbustersold