Type Function Library gameNetwork.* Return value none Revision Release 2024.3703 Keywords gameNetwork, Google Play Game Services See also gameNetwork.request() gameNetwork.show()
Initializes an app for use with Google Play Game Services.
gameNetwork.init( "google" [, initCallback] )
local gameNetwork = require( "gameNetwork" ) local function initCallback( event ) if not event.isError then native.showAlert( "Success!", "", { "OK" } ) else native.showAlert( "Failed!", event.errorMessage, { "OK" } ) print( "Error Code:", event.errorCode ) end end local function onSystemEvent( event ) if ( event.type == "applicationStart" ) then gameNetwork.init( "google", initCallback ) return true end end Runtime:addEventListener( "system", onSystemEvent )