CommonStatusCodes

class CommonStatusCodes

Known direct subclasses
ModuleInstallStatusCodes

Status code for module install APIs.


Common status codes that are often shared across API surfaces.

Summary

Constants

const Int

The client attempted to call a method from an API that failed to connect.

const Int

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

const Int

The connection was suspended while the call was in-flight.

const Int

The application is misconfigured.

const Int
ERROR = 13

The operation failed with no more detailed information.

const Int

An internal error occurred.

const Int

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

const Int

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

const Int

A network error occurred.

const Int

The connection timed-out while attempting to re-connect.

const Int

The connection timed-out while waiting for Google Play services to update.

const Int

There was a non-DeadObjectExceptionRemoteException while calling a connected service.

const Int

Completing the operation requires some form of resolution.

const Int

This property is deprecated.

This case handled during connection, not during API requests.

const Int

This property is deprecated.

This case handled during connection, not during API requests.

const Int

The client attempted to connect to the service but the user is not signed in.

const Int

The operation was successful.

const Int

The operation was successful, but was used the device's cache.

const Int
TIMEOUT = 15

Timed out while awaiting the result.

Public functions

java-static String
getStatusCodeString(statusCode: Int)

Returns untranslated debug string based on the current status code.

Constants

API_NOT_CONNECTED

const val API_NOT_CONNECTED = 17: Int

The client attempted to call a method from an API that failed to connect. Possible reasons include:

  • The API previously failed to connect with a resolvable error, but the user declined the resolution.
  • The device does not support GmsCore.
  • The specific API cannot connect on this device.

CANCELED

const val CANCELED = 16: Int

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

CONNECTION_SUSPENDED_DURING_CALL

const val CONNECTION_SUSPENDED_DURING_CALL = 20: Int

The connection was suspended while the call was in-flight.

API calls will be failed with this status if onServiceDisconnected is called by the Android platform before the call is completed.

This indicates that the underlying service was bound, since onServiceDisconnected should never be called unless onServiceConnected was called first.

It is possible this failure could be resolved by retrying.

DEVELOPER_ERROR

const val DEVELOPER_ERROR = 10: Int

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.

ERROR

const val ERROR = 13: Int

The operation failed with no more detailed information.

INTERNAL_ERROR

const val INTERNAL_ERROR = 8: Int

An internal error occurred. Retrying should resolve the problem.

INTERRUPTED

const val INTERRUPTED = 14: Int

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

INVALID_ACCOUNT

const val INVALID_ACCOUNT = 5: Int

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

NETWORK_ERROR

const val NETWORK_ERROR = 7: Int

A network error occurred. Retrying should resolve the problem.

RECONNECTION_TIMED_OUT

const val RECONNECTION_TIMED_OUT = 22: Int

The connection timed-out while attempting to re-connect.

This failure indicates a connection to Google Play services was successfully established, however it was disconnected for some reason (for example, Google Play services crashed), and re-connecting took longer than expected.

Any API calls failed with this status would have been initiated after the connection was disconnected.

RECONNECTION_TIMED_OUT_DURING_UPDATE

const val RECONNECTION_TIMED_OUT_DURING_UPDATE = 21: Int

The connection timed-out while waiting for Google Play services to update.

This failure indicates a connection to Google Play services was successfully established, however it was disconnected because Google Play services was updated, and the update took far longer than expected.

Any API calls failed with this status would have been initiated after the disconnection for the update.

REMOTE_EXCEPTION

const val REMOTE_EXCEPTION = 19: Int

There was a non-DeadObjectExceptionRemoteException while calling a connected service.

This signifies that an API was able to connect to Google Play services and received an instance, but that when calling an individual method, a RemoteException was thrown.

Note that the exception would not be a DeadObjectException, which indicates that the binding has died (for example if the remote process died). This is because DeadObjectExceptions are handled by the connection management infrastructure of GoogleApi.

If this is encountered during an API call for an API that uses the Google Play services ServiceBroker (most do), it is after a bound service is successfully received from the ServiceBroker.

RESOLUTION_REQUIRED

const val RESOLUTION_REQUIRED = 6: Int

Completing the operation requires some form of resolution. A resolution will be available to be started with startResolutionForResult. 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.

SERVICE_DISABLED

const val SERVICE_DISABLED = 3: Int

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

SERVICE_VERSION_UPDATE_REQUIRED

const val SERVICE_VERSION_UPDATE_REQUIRED = 2: Int

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

SIGN_IN_REQUIRED

const val SIGN_IN_REQUIRED = 4: Int

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 to prompt the user to sign in. After the sign in activity returns with RESULT_OK further attempts should succeed.

SUCCESS

const val SUCCESS = 0: Int

The operation was successful.

SUCCESS_CACHE

const val SUCCESS_CACHE = -1: Int

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.

TIMEOUT

const val TIMEOUT = 15: Int

Timed out while awaiting the result.

Public functions

getStatusCodeString

java-static fun getStatusCodeString(statusCode: Int): String

Returns untranslated debug string based on the current status code.