Games.GamesOptions.Builder

  • Games.GamesOptions.Builder is a helper class used to build Games.GamesOptions.

  • This builder class includes methods such as setIsGmsCoreUiInitiatedRequest, setSdkVariant, and setShowConnectingPopup.

  • The setShowConnectingPopup method can control whether a "connecting" popup is shown during the sign-in flow and its position.

  • The build method is used to create the final Games.GamesOptions object.

public static final class Games.GamesOptions.Builder extends Object

Helper class to build Games.GamesOptions.

Public Method Summary

Games.GamesOptions
Games.GamesOptions.Builder
setIsGmsCoreUiInitiatedRequest(boolean isGmsCoreUiInitiatedRequest)
Sets if the request is initiated from Gms Core UI.
Games.GamesOptions.Builder
setSdkVariant(int variant)
Games.GamesOptions.Builder
setShowConnectingPopup(boolean showConnectingPopup)
Sets whether a "connecting" popup should be displayed automatically at the start of the sign-in flow.
Games.GamesOptions.Builder
setShowConnectingPopup(boolean showConnectingPopup, int gravity)
Sets whether a "connecting" popup should be displayed automatically at the start of the sign-in flow.

Inherited Method Summary

Public Methods

public Games.GamesOptions build ()

public Games.GamesOptions.Builder setIsGmsCoreUiInitiatedRequest (boolean isGmsCoreUiInitiatedRequest)

Sets if the request is initiated from Gms Core UI.

Parameters
isGmsCoreUiInitiatedRequest Whether the request is initiated from Gms Core UI.
Returns
  • This Builder.

public Games.GamesOptions.Builder setSdkVariant (int variant)

public Games.GamesOptions.Builder setShowConnectingPopup (boolean showConnectingPopup)

Sets whether a "connecting" popup should be displayed automatically at the start of the sign-in flow. By default this is enabled.

Note that this call will use the default gravity for the "connecting" popup, which will display the popup at the center of the screen. If you prefer that the popup appear in a different section of the screen, you can use setShowConnectingPopup(boolean, int), and provide a Gravity value.

Parameters
showConnectingPopup Whether or not to show a "connecting" popup at the beginning of the sign-in flow. Default behavior is for this to be true.
Returns
  • This Builder.

public Games.GamesOptions.Builder setShowConnectingPopup (boolean showConnectingPopup, int gravity)

Sets whether a "connecting" popup should be displayed automatically at the start of the sign-in flow. By default this is enabled.

Parameters
showConnectingPopup Whether or not to show a "connecting" popup at the beginning of the sign-in flow. Default behavior is for this to be true.
gravity The Gravity which controls where the "connecting" popup should be displayed during sign-in.
Returns
  • This Builder.