public final class

Status

extends Object
implements Parcelable Result
java.lang.Object
   ↳ com.google.android.gms.common.api.Status

Class Overview

Represents the results of work.

Summary

Constants
int DATE_INVALID The device date is likely set incorrectly.
int DEVELOPER_ERROR The application is misconfigured.
int ERROR The operation failed with no more detailed information.
int GEOFENCE_NOT_AVAILABLE Geofence service is not available now.
int GEOFENCE_TOO_MANY_GEOFENCES Your app has registered more than 100 geofences.
int GEOFENCE_TOO_MANY_PENDING_INTENTS You have provided more than 5 different PendingIntents to the addGeofences(List, PendingIntent, OnAddGeofencesResultListener) call.
int INTERNAL_ERROR An internal error occurred.
int INTERRUPTED Was interrupted while waiting for the result.
int INVALID_ACCOUNT The client attempted to connect to the service with an invalid account name specified.
int LICENSE_CHECK_FAILED The application is not licensed to the user.
int NETWORK_ERROR A network error occurred.
int RESOLUTION_REQUIRED Completing the connection requires some form of resolution.
int SERVICE_DISABLED The installed version of Google Play services has been disabled on this device.
int SERVICE_INVALID The version of the Google Play services installed on this device is not authentic.
int SERVICE_MISSING Google Play services is missing on this device.
int SERVICE_VERSION_UPDATE_REQUIRED The installed version of Google Play services is out of date.
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.
[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final StatusCreator CREATOR
Public Methods
int describeContents()
PendingIntent getResolution()
A pending intent to resolve the failure.
Status getStatus()
int getStatusCode()
Indicates the status of the operation.
boolean hasResolution()
Returns true if calling startResolutionForResult(Activity, int) will start any intents requiring user interaction.
boolean isInterrupted()
Returns true if the operation was interrupted.
boolean isSuccess()
Returns true if the operation was successful.
void startResolutionForResult(Activity activity, int requestCode)
Resolves an error by starting any intents requiring user interaction.
String toString()
void writeToParcel(Parcel out, int flags)
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable
From interface com.google.android.gms.common.api.Result

Constants

public static final int DATE_INVALID

The device date is likely set incorrectly. This error is recoverable by the user updating the date.

Constant Value: 12 (0x0000000c)

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 GEOFENCE_NOT_AVAILABLE

Geofence service is not available now. Typically this is because the user turned off location access in settings > location access.

Constant Value: 1000 (0x000003e8)

public static final int GEOFENCE_TOO_MANY_GEOFENCES

Your app has registered more than 100 geofences. Remove unused ones before adding new geofences.

Constant Value: 1001 (0x000003e9)

public static final int GEOFENCE_TOO_MANY_PENDING_INTENTS

You have provided more than 5 different PendingIntents to the addGeofences(List, PendingIntent, OnAddGeofencesResultListener) call.

Constant Value: 1002 (0x000003ea)

public static final int INTERNAL_ERROR

An internal error occurred. Retrying should resolve the problem.

Constant Value: 8 (0x00000008)

public static final int INTERRUPTED

Was interrupted while waiting for the result.

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 LICENSE_CHECK_FAILED

The application is not licensed to the user. This error is not recoverable and will be treated as fatal.

Constant Value: 11 (0x0000000b)

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 connection 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 to connect 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

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

Constant Value: 3 (0x00000003)

public static final int SERVICE_INVALID

The version of the Google Play services installed on this device is not authentic.

Constant Value: 9 (0x00000009)

public static final int SERVICE_MISSING

Google Play services is missing on this device. The calling activity should pass this error code to getErrorDialog(int, Activity, int) to get a localized error dialog that will resolve the error when shown.

Constant Value: 1 (0x00000001)

public static final int SERVICE_VERSION_UPDATE_REQUIRED

The installed version of Google Play services is out of date. The calling activity should pass this error code to getErrorDialog(int, Activity, 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 or it may call startResolutionForResult(Activity, int) to prompt the user to sign in. After the sign in activity returns with RESULT_OK further attempts to connect 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)

Fields

public static final StatusCreator CREATOR

Public Methods

public int describeContents ()

public PendingIntent getResolution ()

A pending intent to resolve the failure. This intent can be started with startIntentSenderForResult(IntentSender, int, Intent, int, int, int) to present UI to solve the issue.

Returns
  • The pending intent to resolve the failure.

public Status getStatus ()

public int getStatusCode ()

Indicates the status of the operation.

Returns
  • Status code resulting from the operation.

public boolean hasResolution ()

Returns true if calling startResolutionForResult(Activity, int) will start any intents requiring user interaction.

Returns
  • true if there is a resolution that can be started.

public boolean isInterrupted ()

Returns true if the operation was interrupted.

public boolean isSuccess ()

Returns true if the operation was successful.

Returns
  • true if the operation was successful, false if there was an error.

public void startResolutionForResult (Activity activity, int requestCode)

Resolves an error by starting any intents requiring user interaction. See SIGN_IN_REQUIRED, and RESOLUTION_REQUIRED.

Parameters
activity An Activity context to use to resolve the issue. The activity's onActivityResult method will be invoked after the user is done. If the resultCode is RESULT_OK, the application should try to connect again.
requestCode The request code to pass to onActivityResult.
Throws
IntentSender.SendIntentException If the resolution intent has been canceled or is no longer able to execute the request.

public String toString ()

public void writeToParcel (Parcel out, int flags)