Apologies for reposting the question but I get an error using this method and I can't figure out what I'm doing wrong.
mPlayersClient = Games.getPlayersClient(this, googleSignInAccount);
mPlayersClient.getCurrentPlayer()
.addOnCompleteListener(new OnCompleteListener<Player>() {
@Override
public void onComplete(@NonNull Task<Player> task) {
String displayName;
Log.i("playerId" , task.getResult().getPlayerId());
if (task.isSuccessful()) {
displayName = task.getResult().getDisplayName();
Uri uri = task.getResult().getIconImageUri();
Log.i("url", uri.toString());
CircleImageView imageView = findViewById(R.id.testImage);
//ERROR : here when i use "this" it gets red underline
ImageManager manager = ImageManager.create(this);
manager.loadImage(imageView, uri, R.drawable.defualt_user_img);
}
The uri is of content scheme so I can't use Picasso. When I hover cursor over "this" it shows
Create (android.content.Context) in ImageManager cannot be applied to (anonymous com.google.android.gms.tasks.OnCompleteListener)