Closed ndbroadbent closed 7 years ago
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
:memo: Please visit https://cla.developers.google.com/ to sign.
Once you've signed, please reply here (e.g. I signed it!
) and we'll verify. Thanks.
CLAs look good, thanks!
This fix only changes the BaseGameUtils, but the samples themselves still try to pass a string, causing the build to fail:
E.g. ButtonClicker, MainActivity.java does:
@Override
public void onConnectionFailed(ConnectionResult connectionResult) {
Log.d(TAG, "onConnectionFailed() called, result: " + connectionResult);
if (mResolvingConnectionFailure) {
Log.d(TAG, "onConnectionFailed() ignoring connection failure; already resolving.");
return;
}
if (mSignInClicked || mAutoStartSignInFlow) {
mAutoStartSignInFlow = false;
mSignInClicked = false;
mResolvingConnectionFailure = BaseGameUtils.resolveConnectionFailure(this, mGoogleApiClient,
connectionResult, RC_SIGN_IN, getString(R.string.signin_other_error));
}
switchToScreen(R.id.screen_sign_in);
}
Error:(485, 52) error: incompatible types: String cannot be converted to int
The examples themselves need to be adjusted as well.
I'm following the tutorial at https://developers.google.com/games/services/android/init, and these are a few little things that tripped me up. For instance, I had no idea why
BaseGameUtils.resolveConnectionFailure
was complaining about me passing anint
instead of aString
, but that was just a bug in the originalBaseGameUtils
code. (R.string.sign_in_other_error
is actually anint
, and you need to callgetString()
on the resource id.)I also added the missing
sign_in_other_error
string from the tutorial, because I'm not sure why that was excluded.