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 API_CONNECTION_FAILED_ALREADY_IN_USE Error code upon trying to connect to the Nearby Connections API via Google Play Services.
int MISSING_PERMISSION_ACCESS_COARSE_LOCATION The ACCESS_COARSE_LOCATION permission is required.
int MISSING_PERMISSION_ACCESS_WIFI_STATE The ACCESS_WIFI_STATE permission is required.
int MISSING_PERMISSION_BLUETOOTH The BLUETOOTH permission is required.
int MISSING_PERMISSION_BLUETOOTH_ADMIN The BLUETOOTH_ADMIN permission is required.
int MISSING_PERMISSION_CHANGE_WIFI_STATE The CHANGE_WIFI_STATE permission is required.
int MISSING_PERMISSION_RECORD_AUDIO The RECORD_AUDIO permission is required.
int MISSING_SETTING_LOCATION_MUST_BE_ON Location must be turned on (needed for Wifi scans starting from Android M), preferably using https://developers.google.com/android/reference/com/google/android/gms/location/SettingsApi.
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_ALREADY_HAVE_ACTIVE_STRATEGY The app already has active operations (advertising, discovering, or connected to other devices) with another Strategy.
int STATUS_BLUETOOTH_ERROR There was an error trying to use the phone's Bluetooth capabilities.
int STATUS_CONNECTION_REJECTED The remote endpoint rejected the connection request.
int STATUS_ENDPOINT_IO_ERROR An attempt to read from/write to a connected remote endpoint failed.
int STATUS_ENDPOINT_UNKNOWN An attempt to interact with a remote endpoint failed because it's unknown to us -- it's either an endpoint that was never discovered, or an endpoint that never connected to us (both of which are indicative of bad input from the client app).
int STATUS_ERROR The operation failed, without any more information.
int STATUS_NETWORK_NOT_CONNECTED This constant is deprecated. This status code is no longer returned.
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.
int STATUS_OUT_OF_ORDER_API_CALL The app called an API method out of order (i.e.
int STATUS_PAYLOAD_IO_ERROR An attempt to read/write data for a Payload of type FILE or STREAM failed.
[Expand]
Inherited Constants
From class com.google.android.gms.common.api.CommonStatusCodes
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
From class java.lang.Object

Constants

public static final int API_CONNECTION_FAILED_ALREADY_IN_USE

Error code upon trying to connect to the Nearby Connections API via Google Play Services. This error indicates that Nearby Connections is already in use by some app, and thus is currently unavailable to the caller. Delivered to GoogleApiClient.OnConnectionFailedListener.

Constant Value: 8050 (0x00001f72)

public static final int MISSING_PERMISSION_ACCESS_COARSE_LOCATION

The ACCESS_COARSE_LOCATION permission is required.

Constant Value: 8034 (0x00001f62)

public static final int MISSING_PERMISSION_ACCESS_WIFI_STATE

The ACCESS_WIFI_STATE permission is required.

Constant Value: 8032 (0x00001f60)

public static final int MISSING_PERMISSION_BLUETOOTH

The BLUETOOTH permission is required.

Constant Value: 8030 (0x00001f5e)

public static final int MISSING_PERMISSION_BLUETOOTH_ADMIN

The BLUETOOTH_ADMIN permission is required.

Constant Value: 8031 (0x00001f5f)

public static final int MISSING_PERMISSION_CHANGE_WIFI_STATE

The CHANGE_WIFI_STATE permission is required.

Constant Value: 8033 (0x00001f61)

public static final int MISSING_PERMISSION_RECORD_AUDIO

The RECORD_AUDIO permission is required.

Constant Value: 8035 (0x00001f63)

public static final int MISSING_SETTING_LOCATION_MUST_BE_ON

Location must be turned on (needed for Wifi scans starting from Android M), preferably using https://developers.google.com/android/reference/com/google/android/gms/location/SettingsApi.

Constant Value: 8025 (0x00001f59)

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_ALREADY_HAVE_ACTIVE_STRATEGY

The app already has active operations (advertising, discovering, or connected to other devices) with another Strategy. Stop these operations on the current Strategy before trying to advertise or discover with a new Strategy.

Constant Value: 8008 (0x00001f48)

public static final int STATUS_BLUETOOTH_ERROR

There was an error trying to use the phone's Bluetooth capabilities.

Constant Value: 8007 (0x00001f47)

public static final int STATUS_CONNECTION_REJECTED

The remote endpoint rejected the connection request.

Constant Value: 8004 (0x00001f44)

public static final int STATUS_ENDPOINT_IO_ERROR

An attempt to read from/write to a connected remote endpoint failed. If this occurs repeatedly, consider invoking disconnectFromEndpoint(GoogleApiClient, String).

Constant Value: 8012 (0x00001f4c)

public static final int STATUS_ENDPOINT_UNKNOWN

An attempt to interact with a remote endpoint failed because it's unknown to us -- it's either an endpoint that was never discovered, or an endpoint that never connected to us (both of which are indicative of bad input from the client app).

Constant Value: 8011 (0x00001f4b)

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

This constant is deprecated.
This status code is no longer returned.

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 static final int STATUS_OUT_OF_ORDER_API_CALL

The app called an API method out of order (i.e. another method is expected to be called first).

Constant Value: 8009 (0x00001f49)

public static final int STATUS_PAYLOAD_IO_ERROR

An attempt to read/write data for a Payload of type FILE or STREAM failed.

Constant Value: 8013 (0x00001f4d)

Public Methods

public static String getStatusCodeString (int statusCode)

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

Parameters
statusCode int
Returns
String