Migrating to the new Play Games Services APIs
Blog post from Google Cloud
In November 2017, Google Play Services introduced significant changes to its APIs by deprecating the GoogleApiClient class and implementing a more streamlined, feature-specific API client model. This transition aims to reduce boilerplate code, enhance thread safety, and improve memory efficiency by utilizing the Task model, which was positively received in Firebase. The new API approach shifts authentication to the Google Sign-In client, providing clearer control over the authentication process and distinguishing between Google Sign-In and Play Games Services identities. Developers are encouraged to adapt their projects by converting Games category static methods to corresponding API client methods and using the Task class instead of PendingResult, facilitating simpler code with less multi-threaded complexity. The changes also include new handling methods for multi-player invitations and the introduction of the GamesClient class for additional support functions. Resources such as the Android Basic Samples project and Client Server Skeleton project are available to assist developers in transitioning smoothly to the new API structure.