Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Friends #311

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
/.gradle/
.gradle/
.settings/
bin/
gen/
build/
.project
.DS_Store
/.idea
.idea/
*.iml
local.properties
4 changes: 0 additions & 4 deletions BasicSamples/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion BasicSamples/.gradle/1.6/taskArtifacts/cache.properties

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 0 additions & 4 deletions BasicSamples/ButtonClicker/.gitignore

This file was deleted.

3 changes: 0 additions & 3 deletions BasicSamples/CollectAllTheStars2/.gitignore

This file was deleted.

9 changes: 0 additions & 9 deletions BasicSamples/SkeletonTbmp/.classpath

This file was deleted.

1 change: 0 additions & 1 deletion BasicSamples/SkeletonTbmp/.gitignore

This file was deleted.

33 changes: 0 additions & 33 deletions BasicSamples/SkeletonTbmp/.project

This file was deleted.

3 changes: 0 additions & 3 deletions BasicSamples/TypeANumber/.gitignore

This file was deleted.

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 Expand Up @@ -631,14 +631,16 @@ private void onConnected(GoogleSignInAccount googleSignInAccount) {

// get the playerId from the PlayersClient
PlayersClient playersClient = Games.getPlayersClient(this, googleSignInAccount);
playersClient.getCurrentPlayer().addOnSuccessListener(
new OnSuccessListener<Player>() {
playersClient.getCurrentPlayer()
.addOnSuccessListener(new OnSuccessListener<Player>() {
@Override
public void onSuccess(Player player) {
mPlayerId = player.getPlayerId();

switchToMainScreen();
}
}
);
})
.addOnFailureListener(createFailureListener("There was a problem getting the player id!"));
}

// register listener so we are notified if we receive an invitation to play
Expand All @@ -654,7 +656,7 @@ public void onSuccess(Player player) {
public void onSuccess(Bundle hint) {
if (hint != null) {
Invitation invitation =
hint.getParcelable(Multiplayer.EXTRA_TURN_BASED_MATCH);
hint.getParcelable(Multiplayer.EXTRA_INVITATION);

if (invitation != null && invitation.getInvitationId() != null) {
// retrieve and cache the invitation ID
Expand All @@ -665,8 +667,6 @@ public void onSuccess(Bundle hint) {
}
})
.addOnFailureListener(createFailureListener("There was a problem getting the activation hint!"));

switchToMainScreen();
}

private OnFailureListener createFailureListener(final String string) {
Expand Down
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>
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
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
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
46 changes: 0 additions & 46 deletions FAQ.txt

This file was deleted.

Loading