Android Question How to get player bitmap from Google Play Games?

Ivan Aldaz

Member
Licensed User
Longtime User
Hi.

I'm using Informatix's library GooglePlayGameServices to manage scores and leaderboards, and everything goes well, but getting current player's image. I can put this image without a problem on an ImageView, with the code:
B4X:
Dim gpp As GPlayPlayers
    gpp.Initialize
    gpp.CurrentPlayer.GetHiResImage(imageView1)

but I want to show a round picture, and for this I need the bitmap. I can't get the bitmap from
B4X:
Dim bmp1 as Bitmap
    bmp1.Initialize3(imageView1.Bitmap)

'or

Dim bmp1 as Bitmap = imageView1.Bitmap
because it seems to be empty when I try to set another view's bitmap.
B4X:
dim imageView2 as Imageview
    imageView2.Initialize("")
    imageview2.Bitmap = bmp1
I've tried to get the imageview background with
B4X:
Dim bg as BitmapDrawable = imageView1.Background
imageView2.background = bg

'or

imageView2.Background = imageView1.Background
but nothing appears in the imageView2 background, so I think that the method GetHiResImage doesn't put/store the image as a bitmap nor in the background.

I've also tried by getting the image from the URI with
B4X:
Dim imageURI as string =gpp.CurrentPlayer.GetHiResImage2
and get the URI, but can't manage with it, no matter how many methods I've tried from all the threads I've read.

Any ideas on how can I retrieve the player's image as a bitmap?

Thank you.
 
Top