gpgs.loadImage()

Type String
Return value none
Revision 2017.3060
Keywords Google Play Games Services, game network, gpgs, loadImage
See also gpgs.*

Overview

Loads an image from Google's servers using a special Google Play Services URI and writes it to a specified file as a PNG image.

Gotchas

On iOS, image URIs are simple HTTP URLs, but you can still use this function to load images.

Syntax

gpgs.loadImage( params )
params (required)

Table. Contains parameters for the request — see the next section for details.

Parameter Reference

The params table includes parameters for the request.

uri (required)

String. Image resource URI retrieved from another call such as gpgs.players.load().

filename (required)

String. Path for the PNG image file to be saved.

baseDir (optional)

Constant. Optional constant corresponding to the base directory where the file will be saved. Default value is system.CachesDirectory.

listener (optional)

Listener. Listener function which receives a loadImage event.