You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These samples illustrate how to use Google Play Game Services with your Android game.
9
4
10
5
***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.
@@ -21,16 +16,101 @@ These samples illustrate how to use Google Play Game Services with your Android
21
16
22
17
**Note:** In samples with corresponding counterparts for iOS and Web (particularly, CollectAllTheStars and TypeANumber), the player can play a game seamlessly across phones of different platforms. For example, you can play some levels of CollectAllTheStars on your Android device, and then pick up your iOS device and continue where you left off! TypeANumber shows your achievements and leaderboards on all platforms; when you make progress on one platform, that progress is reflected on the other devices, as well.
23
18
24
-
<h2>How to run a sample</h2>
25
-
To use these samples, you need the Google Play Game Services C++ SDK, which you
26
-
can [download from here](https://developers.google.com/games/services/downloads/).
19
+
Pre-requisites
20
+
--------------
21
+
1. Change the applicationId inside each individual samples build.gradle to your own package name
22
+
2. Modify res/values/ids.xml and place your IDs there, as given by the
23
+
Developer Console (create the leaderboards and achievements necessary for
24
+
the sample, if any). In the Developer console, select a resource type
25
+
(Achievements, Events, Leaderboards) and click "Get Resources". Copy the
26
+
contents from the console and replace the contents of res/values/ids.xml.
27
+
28
+
Build with Android Studio
29
+
-------------------------
30
+
This project requires Android Studio 1.5+.
31
+
1. Android SDK version r10e or eariler.
32
+
2. Launch Android Studio.
33
+
3. Import the project by selecting File > New > Import Project and select
34
+
samples-android/build.gradle.
35
+
4. Edit the local.properties file (which is created by Android Studio) and
36
+
set the ndk.dir property to the location of your r10e or eariler NDK.
37
+
5. Change applicationId in the sample app build.gradle to your own package name
38
+
that matches the configuration in the Play Game developer console.
39
+
6. Replace res/values/ids.xml contents with your values from the developer console.
40
+
7. Run the select project. Android Studio will compile, load and start your project on your device
41
+
42
+
All projects could be built at one shot from Android Studio menu "Build" -> "Clean Project"/"Rebuild Project"
43
+
you could also build with Gradle on Terminal/Command line
Licensed to the Apache Software Foundation (ASF) under one or more contributor
104
+
license agreements. See the NOTICE file distributed with this work for
105
+
additional information regarding copyright ownership. The ASF licenses this
106
+
file to you under the Apache License, Version 2.0 (the "License"); you may not
107
+
use this file except in compliance with the License. You may obtain a copy of
108
+
the License at
27
109
28
-
After downloading the archive, unzip it to the `./gpg-cpp-sdk` directory. Then, follow [these directions](https://developers.google.com/games/services/cpp/GettingStartedNativeClient).
0 commit comments