Following this tutorial, I pasted this code into my Main Activity:
@Override
public void onConnectionFailed(ConnectionResult connectionResult) {
if (connectionResult.hasResolution()) {
try {
connectionResult.startResolutionForResult(this, RESOLVE_CONNECTION_REQUEST_CODE);
} catch (IntentSender.SendIntentException e) {
// Unable to resolve, message user appropriately
}
} else {
GooglePlayServicesUtil.getErrorDialog(connectionResult.getErrorCode(), this, 0).show();
}
}
I end up having to import a buncha libraries, but I still can't fix this error:
RESOLVE_CONNECTION_REQUEST_CODE cannot be resolved to a variable
any ideas??? I can't figure out which library contains this constant...