Stay organized with collections Save and categorize content based on your preferences.
public class CommonStatusCodes
Common status codes that are often shared across API surfaces.
Summary Constantsstatic final int
API_NOT_CONNECTED = 17
The client attempted to call a method from an API that failed to connect.
static final int
CANCELED = 16
The result was canceled either due to client disconnect or cancel
.
static final int
CONNECTION_SUSPENDED_DURING_CALL = 20
The connection was suspended while the call was in-flight.
static final int
DEVELOPER_ERROR = 10
The application is misconfigured.
static final int
ERROR = 13
The operation failed with no more detailed information.
static final int
INTERNAL_ERROR = 8
An internal error occurred.
static final int
INTERRUPTED = 14
A blocking call was interrupted while waiting and did not run to completion.
static final int
INVALID_ACCOUNT = 5
The client attempted to connect to the service with an invalid account name specified.
static final int
NETWORK_ERROR = 7
A network error occurred.
static final int
RECONNECTION_TIMED_OUT = 22
The connection timed-out while attempting to re-connect.
static final int
RECONNECTION_TIMED_OUT_DURING_UPDATE = 21
The connection timed-out while waiting for Google Play services to update.
static final int
REMOTE_EXCEPTION = 19
There was a non-DeadObjectException
RemoteException
while calling a connected service.
static final int
RESOLUTION_REQUIRED = 6
Completing the operation requires some form of resolution.
static final int
SERVICE_DISABLED = 3
This field is deprecated.
This case handled during connection, not during API requests.
static final int
SERVICE_VERSION_UPDATE_REQUIRED = 2
This field is deprecated.
This case handled during connection, not during API requests.
static final int
SIGN_IN_REQUIRED = 4
The client attempted to connect to the service but the user is not signed in.
static final int
SUCCESS = 0
The operation was successful.
static final int
SUCCESS_CACHE = -1
The operation was successful, but was used the device's cache.
static final int
TIMEOUT = 15
Timed out while awaiting the result.
Constantspublic static final int API_NOT_CONNECTED = 17
The client attempted to call a method from an API that failed to connect. Possible reasons include:
public static final int CANCELED = 16
The result was canceled either due to client disconnect or cancel
.
public static final int CONNECTION_SUSPENDED_DURING_CALL = 20
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.
public static final int DEVELOPER_ERROR = 10
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.
public static final int ERROR = 13
The operation failed with no more detailed information.
public static final int INTERNAL_ERROR = 8
An internal error occurred. Retrying should resolve the problem.
public static final int INTERRUPTED = 14
A blocking call was interrupted while waiting and did not run to completion.
public static final int INVALID_ACCOUNT = 5
The client attempted to connect to the service with an invalid account name specified.
public static final int NETWORK_ERROR = 7
A network error occurred. Retrying should resolve the problem.
public static final int RECONNECTION_TIMED_OUT = 22
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_UPDATEpublic static final int RECONNECTION_TIMED_OUT_DURING_UPDATE = 21
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.
public static final int REMOTE_EXCEPTION = 19
There was a non-DeadObjectException
RemoteException
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 DeadObjectException
s 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
.
public static final int RESOLUTION_REQUIRED = 6
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.
public static final int SERVICE_DISABLED = 3This field 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 to get a localized error dialog that will resolve the error when shown.
SERVICE_VERSION_UPDATE_REQUIREDpublic static final int SERVICE_VERSION_UPDATE_REQUIRED = 2This field 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 to get a localized error dialog that will resolve the error when shown.
public static final int SIGN_IN_REQUIRED = 4
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.
public static final int SUCCESS = 0
The operation was successful.
public static final int SUCCESS_CACHE = -1
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.
public static final int TIMEOUT = 15
Timed out while awaiting the result.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-03-17 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-17 UTC."],[[["`CommonStatusCodes` defines standard status codes used across various Google APIs for Android."],["These codes indicate the outcome of API operations, such as success, failure, or the need for user action."],["Developers can use these codes to handle different API responses and provide appropriate feedback to users."],["`CommonStatusCodes` includes codes for network issues, authentication problems, and internal errors, among others."],["The `getStatusCodeString` method provides a human-readable description of a given status code for debugging purposes."]]],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4