google::play::initialization

Summary

Enumerations

Environment{
  kUnknown = 0,
  kWindows = 1,
  kAndroid = 2
}
enum
Operating environment.
FormFactor{
  kUnknown = 0,
  kDesktop = 1,
  kMobile = 2
}
enum
Device form factor.
InitializationError{
  kOk = 0,
  kError = 1,
  kActionRequiredShutdownClientProcess = 2,
  kSdkRuntimeUpdateRequired = 3,
  kSdkRuntimeUnavailable = 4
}
enum
Error codes returned by Google Play Initialization.

Typedefs

InitializeContinuation using
std::function< void(InitializeResult)>
InitializeResult using
Result< InitializationError, InitializeResultValue >

Functions

GooglePlayInitialize(std::function< void(InitializeResult)> continuation, const GooglePlayInitializeParams & params)
void
Establishes a connection to Play Services.

Structs

google::play::initialization::GooglePlayInitializeParams

Initialization parameters for GooglePlayInitialize.

google::play::initialization::InitializeResultValue

Result value for initialization.

Enumerations

Environment

 Environment

Operating environment.

Properties
kAndroid

Android environment.

kUnknown

The environment is unknown.

kWindows

Native Windows environment.

FormFactor

 FormFactor

Device form factor.

Properties
kDesktop

Desktop form factor (e.g. PC, Chromebook).

kMobile

Mobile form factor (e.g. phone, tablet).

kUnknown

The form factor is unknown.

InitializationError

 InitializationError

Error codes returned by Google Play Initialization.

Properties
kActionRequiredShutdownClientProcess

The calling client process should shutdown as soon as possible.

This may be returned when a game is not launched via Google Play Games and is in the process of being relaunched.

kError

Fatal error during initialization.

kOk

The operation completed successfully.

kSdkRuntimeUnavailable

The SDK runtime is unavailable.

The user will need to install Google Play Games and the SDK runtime in order to proceed.

kSdkRuntimeUpdateRequired

The current version of the SDK runtime installed on the device does not support the calling version of the SDK.

The user will need to update Google Play Games and the SDK runtime in order to proceed.

Typedefs

InitializeContinuation

std::function< void(InitializeResult)> InitializeContinuation

InitializeResult

Result< InitializationError, InitializeResultValue > InitializeResult

Functions

GooglePlayInitialize

void GooglePlayInitialize(
  std::function< void(InitializeResult)> continuation,
  const GooglePlayInitializeParams & params = {}
)

Establishes a connection to Play Services.

Must be called and return successfully before using any other API.

If initialization fails your application should exit and close any running processes as soon as possible.

Without a successful initialization your application can not use the Play PC SDK and critical checks such as ensuring that the user has a valid license to your application may have failed or could not be performed.

Details
Parameters
continuation
The async callback to return the data to.
params
(Optional) Initialization parameters for GooglePlayInitialize.