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

# ConnectionsStatusCodes

extends CommonStatusCodes

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

## Class Overview

Status codes for nearby connections results.

## Summary

Constants
int | STATUS_ALREADY_ADVERTISING | The app is already advertising; call stopAdvertising() before trying to advertise again.
int | STATUS_ALREADY_CONNECTED_TO_ENDPOINT | The app is already connected to the specified endpoint.
int | STATUS_ALREADY_DISCOVERING | The app is already discovering the specified application ID; call stopDiscovery() before trying to advertise again.
int | STATUS_CONNECTION_REJECTED | The remote endpoint rejected the connection request.
int | STATUS_ERROR | The operation failed, without any more information.
int | STATUS_NETWORK_NOT_CONNECTED | The device is not connected to a network (over Wifi or Ethernet).
int | STATUS_NOT_CONNECTED_TO_ENDPOINT | The remote endpoint is not connected; messages cannot be sent to it.
int | STATUS_OK | The operation was successful.

[Expand] Inherited Constants
From class com.google.android.gms.common.api.CommonStatusCodes
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 Methods
static String | getStatusCodeString(int statusCode) Returns an untranslated debug (not user-friendly!) string based on the current status code.

[Expand] Inherited Methods
From class com.google.android.gms.common.api.CommonStatusCodes
static String | getStatusCodeString(int statusCode)
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 STATUS_ALREADY_ADVERTISING

The app is already advertising; call stopAdvertising() before trying to advertise again.

Constant Value: 8001 (0x00001f41)

#### public static final int STATUS_ALREADY_CONNECTED_TO_ENDPOINT

The app is already connected to the specified endpoint. Multiple connections to a remote endpoint cannot be maintained simultaneously.

Constant Value: 8003 (0x00001f43)

#### public static final int STATUS_ALREADY_DISCOVERING

The app is already discovering the specified application ID; call stopDiscovery() before trying to advertise again.

Constant Value: 8002 (0x00001f42)

#### public static final int STATUS_CONNECTION_REJECTED

The remote endpoint rejected the connection request.

Constant Value: 8004 (0x00001f44)

#### public static final int STATUS_ERROR

The operation failed, without any more information.

Constant Value: 13 (0x0000000d)

#### public static final int STATUS_NETWORK_NOT_CONNECTED

The device is not connected to a network (over Wifi or Ethernet). Prompt the user to connect their device when this status code is returned.

Constant Value: 8000 (0x00001f40)

#### public static final int STATUS_NOT_CONNECTED_TO_ENDPOINT

The remote endpoint is not connected; messages cannot be sent to it.

Constant Value: 8005 (0x00001f45)

#### public static final int STATUS_OK

The operation was successful.

Constant Value: 0 (0x00000000)

## Public Methods

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

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