2.9.3 (latest) 2.9.2 2.8.1 2.7.2 2.6.0 2.5.1 2.4.1 2.1.2 2.0.1 1.35.2 1.34.1 1.33.4 [com.google.api.client.util.Beta](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.util.Beta.md.txt)   

Utilities based on [Google
Play services](https://developers.google.com/android/google-play-services/).

## Classes

### [GoogleAccountCredential](https://docs.cloud.google.com/java/docs/reference/google-api-client/latest/com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential.md.txt)

Beta   

Manages authorization and account selection for Google accounts.

When fetching a token, any thrown GoogleAuthException would be wrapped:

- GooglePlayServicesAvailabilityException would be wrapped inside of [GooglePlayServicesAvailabilityIOException](https://docs.cloud.google.com/java/docs/reference/google-api-client/latest/com.google.api.client.googleapis.extensions.android.gms.auth.GooglePlayServicesAvailabilityIOException.md.txt)
- UserRecoverableAuthException would be wrapped inside of [UserRecoverableAuthIOException](https://docs.cloud.google.com/java/docs/reference/google-api-client/latest/com.google.api.client.googleapis.extensions.android.gms.auth.UserRecoverableAuthIOException.md.txt)
- GoogleAuthException when be wrapped inside of [GoogleAuthIOException](https://docs.cloud.google.com/java/docs/reference/google-api-client/latest/com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAuthIOException.md.txt)

Upgrade warning: in prior version 1.14 exponential back-off was enabled by default when I/O
exception was thrown inside [#getToken](https://docs.cloud.google.com/java/docs/reference/google-api-client/latest/com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential.md.txt#com_google_api_client_googleapis_extensions_android_gms_auth_GoogleAccountCredential_getToken_), but starting with version 1.15 you need to call
[#setBackOff](https://docs.cloud.google.com/java/docs/reference/google-api-client/latest/com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential.md.txt#com_google_api_client_googleapis_extensions_android_gms_auth_GoogleAccountCredential_setBackOff_) with ExponentialBackOff to enable it.

## Exceptions

### [GoogleAuthIOException](https://docs.cloud.google.com/java/docs/reference/google-api-client/latest/com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAuthIOException.md.txt)

Beta   

Wraps a GoogleAuthException into an [IOException](https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html) so it can be caught directly.

Use [#getCause()](https://docs.cloud.google.com/java/docs/reference/google-api-client/latest/com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAuthIOException.md.txt#com_google_api_client_googleapis_extensions_android_gms_auth_GoogleAuthIOException_getCause__) to get the wrapped GoogleAuthException.

### [GooglePlayServicesAvailabilityIOException](https://docs.cloud.google.com/java/docs/reference/google-api-client/latest/com.google.api.client.googleapis.extensions.android.gms.auth.GooglePlayServicesAvailabilityIOException.md.txt)

Beta   

Wraps a GooglePlayServicesAvailabilityException into an [IOException](https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html) so it can be
caught directly.

Use [#getConnectionStatusCode()](https://docs.cloud.google.com/java/docs/reference/google-api-client/latest/com.google.api.client.googleapis.extensions.android.gms.auth.GooglePlayServicesAvailabilityIOException.md.txt#com_google_api_client_googleapis_extensions_android_gms_auth_GooglePlayServicesAvailabilityIOException_getConnectionStatusCode__) to display the error dialog. Alternatively, use [#getCause()](https://docs.cloud.google.com/java/docs/reference/google-api-client/latest/com.google.api.client.googleapis.extensions.android.gms.auth.GooglePlayServicesAvailabilityIOException.md.txt#com_google_api_client_googleapis_extensions_android_gms_auth_GooglePlayServicesAvailabilityIOException_getCause__) to get the wrapped GooglePlayServicesAvailabilityException. Example usage:

```java

  catch (final GooglePlayServicesAvailabilityIOException availabilityException) {
   myActivity.runOnUiThread(new Runnable() {
   public void run() {
   Dialog dialog = GooglePlayServicesUtil.getErrorDialog(
      availabilityException.getConnectionStatusCode(),
      myActivity, MyActivity.REQUEST_GOOGLE_PLAY_SERVICES);
   dialog.show();
 }
 }
```

### [UserRecoverableAuthIOException](https://docs.cloud.google.com/java/docs/reference/google-api-client/latest/com.google.api.client.googleapis.extensions.android.gms.auth.UserRecoverableAuthIOException.md.txt)

Beta   

Wraps a UserRecoverableAuthException into an [IOException](https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html) so it can be caught
directly.

Use [#getIntent()](https://docs.cloud.google.com/java/docs/reference/google-api-client/latest/com.google.api.client.googleapis.extensions.android.gms.auth.UserRecoverableAuthIOException.md.txt#com_google_api_client_googleapis_extensions_android_gms_auth_UserRecoverableAuthIOException_getIntent__) to allow user interaction to recover. Alternatively, use [#getCause()](https://docs.cloud.google.com/java/docs/reference/google-api-client/latest/com.google.api.client.googleapis.extensions.android.gms.auth.UserRecoverableAuthIOException.md.txt#com_google_api_client_googleapis_extensions_android_gms_auth_UserRecoverableAuthIOException_getCause__) to get the wrapped UserRecoverableAuthException. Example usage:

```java

  catch (UserRecoverableAuthIOException userRecoverableException) {
   myActivity.startActivityForResult(
   userRecoverableException.getIntent(), MyActivity.REQUEST_AUTHORIZATION);
 }
 }
```