How to show Google play game services profile image?

I use SDKBoxPlay, success sigin, use sdkbox.PluginSdkboxPlay.getPlayerAccountField(“icon_image_uri”) to get profile image, it return uri like this: content://, and I dont know how to show it to my game. I found some document but It require URL not URI. Thanks.

We can ask @yinjimmy to take a look.

My Cocos Creator version is 2.4.3. Thanks.

try to save the uri to file, and load image from absolute path in cocos creator.

To get Bitmap from imageView :

Bitmap bm=imageview.getDrawingCache();

To save it in a file:

OutputStream fOut = null;
Uri outputFileUri;
try {
    File root = new File(Environment.getExternalStorageDirectory()
        + File.separator + "folder_name" + File.separator);
    File sdImageMainDirectory = new File(root, "myPicName.jpg");
    outputFileUri = Uri.fromFile(sdImageMainDirectory);
    fOut = new FileOutputStream(sdImageMainDirectory);
} catch (Exception e) {
    Toast.makeText(this, "Error occured. Please try again later.",
try {
    bm.compress(Bitmap.CompressFormat.PNG, 100, fOut);
} catch (Exception e) {
1 Like