gpgs.* — Google Play Games Services

Type Library
Revision 2017.3083
Keywords Google Play Games Services, game network, gpgs
Platforms Android

Overview

The Google Play Games Services plugin enables access to Google Play Games Services for game networking, including achievements, leaderboards, multiplayer, quests, videos, and more.

Important
  • To use this plugin, you must implement Google app licensing as outlined here and sign the .apk with a private key as outlined here.

  • Formerly, this plugin was also compatible with iOS, but Google no longer supports integration with iOS. If you previously implemented this service on iOS, you should migrate that implementation to another service.

  • This plugin is backward-compatible with the legacy gameNetwork.google plugin. To use it, however, you must adhere to all Project Settings indicated below and require() "plugin.gpgs". In addition, you should remove the legacy plugin from build.settings as you can not include both plugins in your project.

If you encounter Google Play Games Services login issues/errors after implementing this plugin, ensure that you have enabled both Drive API and Google Play Developer API within the Google Play Developer Console.

Syntax

local gpgs = require( "plugin.gpgs" )

Functions

These core functions manage connection to Google's servers, authentication, and other tasks.

Nodes

Specific functionality aspects of this plugin are divided into nodes for better organization:

Events

Types

Project Settings

To use this plugin, add an entry into the plugins table of build.settings. When added, the build server will integrate the plugin during the build phase.

settings = {

    plugins =
    {
        ["plugin.gpgs"] =
        {
            publisherId = "com.coronalabs"
        },
    },
}

Additionally, you must specify the Google Play Games App ID in the android table of build.settings as the googlePlayGamesAppId key:

settings = {

    android =
    {
        googlePlayGamesAppId = "YOUR_APPLICATION_ID",
    },
}