Pretty cool, right?Now that you've finished the code lab, there are a few more things you can do before you are ready to publish your awesome game.
Re-open your game and attempt to sign in again, if it succeeds then you have successfully enabled saved games.Writing data to the saved games API is a two-step process. Google Play Services SDK: Install the Google Play services SDK. Open Run the game on your Android device and play a level all the way through (make sure you hit a few targets!). Google Play games services is deprecated for client-only web games, and is not likely to function You should create two client IDs, one with the release certificate fingerprint and
This step requires you to run the game on your Android device. when setting up your game to use the Google Play games services.For additional tips, refer to these related resources:Before proceeding further, you should add test accounts to your game as described in
The size impact of the Google Play Games Services library depends on whether the game engine runs on Java, Native, or Unity. Let's add a button to the main menu that brings up the achievements list UI.First, let's add the code to show achievements. (see For Android, you do not need to include the full client ID in your application,
After you sign in and play through a level, your scores will be intact! manage game services and configure metadata for authorizing and authenticating Open the Game Services page, select the Google Play games services tab on the left, then click the Add New Game button. If your UI is not behaving as expected, make sure that the names of objects passed to Now that your users are signed in with access to Play Game Services, it is time to start adding awesome features to your game. You may be thinking "big deal, all I did was persist an integer and I had to write a ton of code!". Open Now that we are keeping track of the user's hits, we will add the code to update the leaderboard. In this section, we will add achievements to the game for hitting enemies and a UI for users to view their progress.We are going to create two achievements for this game. CollectAllTheStarsNative: Demonstrates how to use the Saved Games feature to save game data.The sample signs the user in, synchronizes their data from a named game save, and then updates the UI to reflect the saved game state. In this section, we will add a global high score leaderboard to the game and a UI for users to view their scores.We added the leaderboard to the Play Console already, so we don't need to do any additional configuration, and we can jump right into the coding!Let's add a button to the main menu that brings up the leaderboards list UI, just like the Achievements button we added earlier.First, let's add the code to bring up the leaderboards UI. The fingerprint of the key and the bundle id uniquely identify the application when communicating with Play Game Services.For Mac/Linux this should be named $HOME/.android/debug.keystoreFor Windows this should be named C:\Users\