Skip to content

Commit

Permalink
Add deprecation notice
Browse files Browse the repository at this point in the history
Add Friends Functionality

Add Friends Functionality

Add Friends Functionality

Add Friends Functionality

Add Friends Functionality

Add Friends Functionality

Add Friends Functionality
  • Loading branch information
dturner authored and redls committed Sep 8, 2020
1 parent 121a9c9 commit 8900df5
Show file tree
Hide file tree
Showing 32 changed files with 420 additions and 68 deletions.
12 changes: 8 additions & 4 deletions ButtonClicker/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,22 @@ android {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt')
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
}

dependencies {
implementation "com.android.support:appcompat-v7:${appcompat_library_version}"
implementation "com.android.support:support-v4:${support_library_version}"
implementation "com.google.android.gms:play-services-games:${gms_library_version}"
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation "com.google.android.gms:play-services-games:20.0.1"
implementation "com.google.android.gms:play-services-auth:${gms_library_version}"
}

buildscript {
repositories {
jcenter()
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.support.annotation.NonNull;
import androidx.annotation.NonNull;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
Expand Down
2 changes: 1 addition & 1 deletion ButtonClicker/src/main/res/values-v13/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
-->

<resources>
<style name="AppTheme" parent="android:Theme.Holo.Light.NoActionBar" />
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar" />
</resources>
4 changes: 2 additions & 2 deletions CollectAllTheStars2/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ android {
}

dependencies {
implementation "com.android.support:appcompat-v7:${appcompat_library_version}"
implementation "com.android.support:support-v4:${support_library_version}"
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation "com.google.android.gms:play-services-games:${gms_library_version}"
implementation "com.google.android.gms:play-services-auth:${gms_library_version}"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@

package com.google.example.games.catt2;

import android.app.Activity;
import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.Intent;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
Expand All @@ -32,6 +29,10 @@
import android.widget.TextView;
import android.widget.Toast;

import androidx.annotation.NonNull;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;

import com.google.android.gms.auth.api.signin.GoogleSignIn;
import com.google.android.gms.auth.api.signin.GoogleSignInAccount;
import com.google.android.gms.auth.api.signin.GoogleSignInClient;
Expand Down Expand Up @@ -72,7 +73,7 @@
*
* @author Bruno Oliveira (Google)
*/
public class MainActivity extends Activity implements
public class MainActivity extends AppCompatActivity implements
View.OnClickListener,
OnRatingBarChangeListener {

Expand Down Expand Up @@ -393,7 +394,7 @@ protected void onStart() {
checkPlaceholderIds();
}

public static boolean verifySampleSetup(Activity activity, int... resIds) {
public static boolean verifySampleSetup(AppCompatActivity activity, int... resIds) {
StringBuilder problems = new StringBuilder();
boolean problemFound = false;
problems.append("The following set up problems were found:\n\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
*/
package com.google.example.games.catt2;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
Expand All @@ -28,6 +27,8 @@
import android.widget.ListView;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;

import com.google.android.gms.common.images.ImageManager;
import com.google.android.gms.games.snapshot.Snapshot;
import com.google.android.gms.games.snapshot.SnapshotMetadata;
Expand All @@ -44,7 +45,7 @@
*
* @author Clayton Wilkinson (Google)
*/
public class SelectSnapshotActivity extends Activity implements AdapterView.OnItemClickListener {
public class SelectSnapshotActivity extends AppCompatActivity implements AdapterView.OnItemClickListener {

private static final String TAG = "SelSnapshotActivity";
// intent data which is a snapshot metadata
Expand Down Expand Up @@ -116,7 +117,7 @@ public void onItemClick(AdapterView<?> adapterView, View view, int position, lon
static class SnapshotListAdapter<T> extends ArrayAdapter<T> {


public SnapshotListAdapter(Activity activity, ArrayList<T> data) {
public SnapshotListAdapter(AppCompatActivity activity, ArrayList<T> data) {
super(activity, R.layout.snapshotlayout, data);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import android.content.Intent;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.annotation.NonNull;
import androidx.annotation.NonNull;
import android.util.Log;

import com.google.android.gms.common.api.CommonStatusCodes;
Expand Down
2 changes: 1 addition & 1 deletion CollectAllTheStars2/src/main/res/values-v11/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
Base application theme for API 11+. This theme completely replaces
AppBaseTheme from res/values/styles.xml on API 11+ devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Holo.Light">
<style name="AppBaseTheme" parent="Theme.AppCompat.Light">
<!-- API 11 theme customizations can go here. -->
</style>

Expand Down
2 changes: 1 addition & 1 deletion CollectAllTheStars2/src/main/res/values-v14/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
AppBaseTheme from BOTH res/values/styles.xml and
res/values-v11/styles.xml on API 14+ devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
<style name="AppBaseTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- API 14 theme customizations can go here. -->
</style>

Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ These are the Android samples for Google Play game services.

* **CollectAllTheStars2**. Demonstrates how to use the Snapshots feature to save game data. The sample signs the user in, synchronizes their data from a named Snapshot, then updates the UI to reflect the game state saved in the Snapshot.

* **TypeANumber**. Demonstrates how to use leaderboards, achievements and events. In this exciting game, you type the score you think you deserve. But wait! There is a twist. If you are playing in easy mode, you get the score you requested. However, if you are playing in hard mode, you only get half! (tough game, we know).
* **TypeANumber**. Demonstrates how to use leaderboards, achievements, events, and friends. In this exciting game, you type the score you think you deserve. But wait! There is a twist. If you are playing in easy mode, you get the score you requested. However, if you are playing in hard mode, you only get half! (tough game, we know). You can also check how your friends perform in this game by checking out social leaderboards.

* **SkeletonTbmp** A trivial turn-based-multiplayer game. In this thrilling game, you can invite many friends, then send a shared gamestate string back and forth until someone finishes, cancels, or the second-to-last player leaves.

> **Warning:** Real-time and turn-based multiplayer services are deprecated as of September 16th, 2019. These services are unavailable for new games. For more information, see [Ending support for multiplayer APIs in Play Games Services](https://support.google.com/googleplay/android-developer/answer/9469745).
<h2>How to run a sample</h2>

1. Set up the project in the Developer Console by following [these instructions](https://developers.google.com/games/services/console/enabling).
Expand Down
4 changes: 2 additions & 2 deletions SkeletonTbmp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ android {
}

dependencies {
implementation "com.android.support:appcompat-v7:${appcompat_library_version}"
implementation "com.android.support:support-v4:${support_library_version}"
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation "com.google.android.gms:play-services-games:${gms_library_version}"
implementation "com.google.android.gms:play-services-auth:${gms_library_version}"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,18 @@
package com.google.example.games.tbmpskeleton;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.util.Log;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;

import androidx.annotation.NonNull;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;

import com.google.android.gms.auth.api.signin.GoogleSignIn;
import com.google.android.gms.auth.api.signin.GoogleSignInAccount;
import com.google.android.gms.auth.api.signin.GoogleSignInClient;
Expand Down Expand Up @@ -71,7 +73,7 @@
*
* @author Wolff ([email protected]), 2013
*/
public class SkeletonActivity extends Activity implements
public class SkeletonActivity extends AppCompatActivity implements
View.OnClickListener {

public static final String TAG = "SkeletonActivity";
Expand Down
2 changes: 1 addition & 1 deletion SkeletonTbmp/src/main/res/values-v11/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Base application theme for API 11+. This theme completely replaces
AppBaseTheme from res/values/styles.xml on API 11+ devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Holo.Light">
<style name="AppBaseTheme" parent="Theme.AppCompat.Light">
<!-- API 11 theme customizations can go here. -->
</style>

Expand Down
2 changes: 1 addition & 1 deletion SkeletonTbmp/src/main/res/values-v14/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
AppBaseTheme from BOTH res/values/styles.xml and
res/values-v11/styles.xml on API 14+ devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
<style name="AppBaseTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- API 14 theme customizations can go here. -->
</style>

Expand Down
9 changes: 6 additions & 3 deletions TypeANumber/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,12 @@ android {
}

dependencies {
implementation "com.android.support:appcompat-v7:${appcompat_library_version}"
implementation "com.android.support:support-v4:${support_library_version}"
implementation "com.google.android.gms:play-services-games:${gms_library_version}"
implementation 'androidx.appcompat:appcompat:1.3.0-alpha01'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation "androidx.activity:activity:1.2.0-alpha08"
implementation "androidx.activity:activity-ktx:1.2.0-alpha03"
implementation "androidx.fragment:fragment:1.3.0-alpha08"
implementation "com.google.android.gms:play-services-games:20.0.1"
implementation "com.google.android.gms:play-services-auth:${gms_library_version}"
}

Expand Down
Loading

0 comments on commit 8900df5

Please sign in to comment.