Summary: Constants | Ctors | Methods | Inherited Methods | [Expand All]
public class

# CommonStatusCodes

extends Object

java.lang.Object
↳ | com.google.android.gms.common.api.CommonStatusCodes

Known Direct Subclasses AwarenessStatusCodes, DriveStatusCodes, FitnessStatusCodes, GeofenceStatusCodes, GoogleSignInStatusCodes, LocationSettingsStatusCodes, NearbyMessagesStatusCodes, PlacesStatusCodes, SafetyNetStatusCodes, WearableStatusCodes
AwarenessStatusCodes | Awareness specific status codes, for use in `getStatusCode()`.
DriveStatusCodes | Drive specific status codes, for use in `getStatusCode()`.
FitnessStatusCodes | Google Fit specific status codes, for use in `getStatusCode()`
GeofenceStatusCodes | Geofence specific status codes, for use in `getStatusCode()`
GoogleSignInStatusCodes | Google Sign In specific status codes, for use in `Status#getStatusCode()`.
LocationSettingsStatusCodes | Location settings specific status codes, for use in `getStatusCode()`
NearbyMessagesStatusCodes | Nearby.Messages specific status codes, for use in `getStatusCode()`.
PlacesStatusCodes | Places API specific status codes, for use in `getStatusCode()`
SafetyNetStatusCodes | Status codes for the SafetyNet API.
WearableStatusCodes | Error codes for wearable API failures.

## Class Overview

Common status codes that are often shared across API surfaces.

## Summary

Constants
int | API_NOT_CONNECTED | The client attempted to call a method from an API that failed to connect.
int | CANCELED | The result was canceled either due to client disconnect or `cancel()`.
int | DEVELOPER_ERROR | The application is misconfigured.
int | ERROR | The operation failed with no more detailed information.
int | INTERNAL_ERROR | An internal error occurred.
int | INTERRUPTED | A blocking call was interrupted while waiting and did not run to completion.
int | INVALID_ACCOUNT | The client attempted to connect to the service with an invalid account name specified.
int | NETWORK_ERROR | A network error occurred.
int | RESOLUTION_REQUIRED | Completing the operation requires some form of resolution.
int | SERVICE_DISABLED | This constant is deprecated. This case handled during connection, not during API requests. No results should be returned with this status code.
int | SERVICE_VERSION_UPDATE_REQUIRED | This constant is deprecated. This case handled during connection, not during API requests. No results should be returned with this status code.
int | SIGN_IN_REQUIRED | The client attempted to connect to the service but the user is not signed in.
int | SUCCESS | The operation was successful.
int | SUCCESS_CACHE | The operation was successful, but was used the device's cache.
int | TIMEOUT | Timed out while awaiting the result.

Public Constructors
| CommonStatusCodes()

Public Methods
static String | getStatusCodeString(int statusCode)

[Expand] Inherited Methods
From class java.lang.Object
Object | clone()
boolean | equals(Object arg0)
void | finalize()
final Class<?> | getClass()
int | hashCode()
final void | notify()
final void | notifyAll()
String | toString()
final void | wait(long arg0, int arg1)
final void | wait(long arg0)
final void | wait()

## Constants

#### public static final int API_NOT_CONNECTED

The client attempted to call a method from an API that failed to connect. See `addApiIfAvailable(Api, Scope...)`.

Constant Value: 17 (0x00000011)

#### public static final int CANCELED

The result was canceled either due to client disconnect or `cancel()`.

Constant Value: 16 (0x00000010)

#### public static final int DEVELOPER_ERROR

The application is misconfigured. This error is not recoverable and will be treated as fatal. The developer should look at the logs after this to determine more actionable information.

Constant Value: 10 (0x0000000a)

#### public static final int ERROR

The operation failed with no more detailed information.

Constant Value: 13 (0x0000000d)

#### public static final int INTERNAL_ERROR

An internal error occurred. Retrying should resolve the problem.

Constant Value: 8 (0x00000008)

#### public static final int INTERRUPTED

A blocking call was interrupted while waiting and did not run to completion.

Constant Value: 14 (0x0000000e)

#### public static final int INVALID_ACCOUNT

The client attempted to connect to the service with an invalid account name specified.

Constant Value: 5 (0x00000005)

#### public static final int NETWORK_ERROR

A network error occurred. Retrying should resolve the problem.

Constant Value: 7 (0x00000007)

#### public static final int RESOLUTION_REQUIRED

Completing the operation requires some form of resolution. A resolution will be available to be started with `startResolutionForResult(Activity, int)`. If the result returned is `RESULT_OK`, then further attempts should either complete or continue on to the next issue that needs to be resolved.

Constant Value: 6 (0x00000006)

#### public static final int SERVICE_DISABLED

This constant is deprecated.
This case handled during connection, not during API requests. No results should be returned with this status code.

The installed version of Google Play services has been disabled on this device. The calling activity should pass this error code to `getErrorDialog(Activity, int, int)` to get a localized error dialog that will resolve the error when shown.

Constant Value: 3 (0x00000003)

#### public static final int SERVICE_VERSION_UPDATE_REQUIRED

This constant is deprecated.
This case handled during connection, not during API requests. No results should be returned with this status code.

The installed version of Google Play services is out of date. The calling activity should pass this error code to `getErrorDialog(Activity, int, int)` to get a localized error dialog that will resolve the error when shown.

Constant Value: 2 (0x00000002)

#### public static final int SIGN_IN_REQUIRED

The client attempted to connect to the service but the user is not signed in. The client may choose to continue without using the API. Alternately, if `hasResolution()` returns true the client may call `startResolutionForResult(Activity, int)` to prompt the user to sign in. After the sign in activity returns with `RESULT_OK` further attempts should succeed.

Constant Value: 4 (0x00000004)

#### public static final int SUCCESS

The operation was successful.

Constant Value: 0 (0x00000000)

#### public static final int SUCCESS_CACHE

The operation was successful, but was used the device's cache. If this is a write, the data will be written when the device is online; errors will be written to the logs. If this is a read, the data was read from a device cache and may be stale.

Constant Value: -1 (0xffffffff)

#### public static final int TIMEOUT

Timed out while awaiting the result.

Constant Value: 15 (0x0000000f)

## Public Constructors

#### public CommonStatusCodes ()

## Public Methods

#### public static String getStatusCodeString (int statusCode)

##### Returns

- untranslated debug (not user-friendly!) string based on the current status code.