ConnectionsStatusCodes

public final class ConnectionsStatusCodes extends CommonStatusCodes

Status codes for nearby connections results.

Constant Summary

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 Manifest.permission.ACCESS_COARSE_LOCATION permission is required.
int MISSING_PERMISSION_ACCESS_FINE_LOCATION The Manifest.permission.ACCESS_FINE_LOCATION permission is required.
int MISSING_PERMISSION_ACCESS_WIFI_STATE The Manifest.permission.ACCESS_WIFI_STATE permission is required.
int MISSING_PERMISSION_BLUETOOTH The Manifest.permission.BLUETOOTH permission is required.
int MISSING_PERMISSION_BLUETOOTH_ADMIN The Manifest.permission.BLUETOOTH_ADMIN permission is required.
int MISSING_PERMISSION_BLUETOOTH_ADVERTISE The Manifest.permission.BLUETOOTH_ADVERTISE permission is required.
int MISSING_PERMISSION_BLUETOOTH_CONNECT The Manifest.permission.BLUETOOTH_CONNECT permission is required.
int MISSING_PERMISSION_BLUETOOTH_SCAN The Manifest.permission.BLUETOOTH_SCAN permission is required.
int MISSING_PERMISSION_CHANGE_WIFI_STATE The Manifest.permission.CHANGE_WIFI_STATE permission is required.
int MISSING_PERMISSION_NEARBY_WIFI_DEVICES The Manifest.permission.NEARBY_WIFI_DEVICES permission is required.
int MISSING_PERMISSION_RECORD_AUDIO The Manifest.permission.RECORD_AUDIO permission is required.
int MISSING_SETTING_LOCATION_MUST_BE_ON This constant is deprecated. This status code is no longer returned.
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 This constant is deprecated. Use STATUS_RADIO_ERROR instead.
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 Payload.Type.FILE or Payload.Type.STREAM failed.
int STATUS_RADIO_ERROR There was an error trying to use the phone's Bluetooth/WiFi/NFC capabilities.

Inherited Constant Summary

Public Method Summary

static String
getStatusCodeString(int statusCode)
Returns an untranslated debug (not user-friendly!) string based on the current status code.

Inherited Method Summary

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

public static final int MISSING_PERMISSION_ACCESS_COARSE_LOCATION

The Manifest.permission.ACCESS_COARSE_LOCATION permission is required.

Constant Value: 8034

public static final int MISSING_PERMISSION_ACCESS_FINE_LOCATION

The Manifest.permission.ACCESS_FINE_LOCATION permission is required.

Constant Value: 8036

public static final int MISSING_PERMISSION_ACCESS_WIFI_STATE

The Manifest.permission.ACCESS_WIFI_STATE permission is required.

Constant Value: 8032

public static final int MISSING_PERMISSION_BLUETOOTH

The Manifest.permission.BLUETOOTH permission is required.

Constant Value: 8030

public static final int MISSING_PERMISSION_BLUETOOTH_ADMIN

The Manifest.permission.BLUETOOTH_ADMIN permission is required.

Constant Value: 8031

public static final int MISSING_PERMISSION_BLUETOOTH_ADVERTISE

The Manifest.permission.BLUETOOTH_ADVERTISE permission is required.

Constant Value: 8038

public static final int MISSING_PERMISSION_BLUETOOTH_CONNECT

The Manifest.permission.BLUETOOTH_CONNECT permission is required.

Constant Value: 8039

public static final int MISSING_PERMISSION_BLUETOOTH_SCAN

The Manifest.permission.BLUETOOTH_SCAN permission is required.

Constant Value: 8037

public static final int MISSING_PERMISSION_CHANGE_WIFI_STATE

The Manifest.permission.CHANGE_WIFI_STATE permission is required.

Constant Value: 8033

public static final int MISSING_PERMISSION_NEARBY_WIFI_DEVICES

The Manifest.permission.NEARBY_WIFI_DEVICES permission is required.

Constant Value: 8029

public static final int MISSING_PERMISSION_RECORD_AUDIO

The Manifest.permission.RECORD_AUDIO permission is required.

Constant Value: 8035

public static final int MISSING_SETTING_LOCATION_MUST_BE_ON

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

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

Constant Value: 8025

public static final int STATUS_ALREADY_ADVERTISING

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

Constant Value: 8001

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

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

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

public static final int STATUS_BLUETOOTH_ERROR

This constant is deprecated.
Use STATUS_RADIO_ERROR instead.

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

Constant Value: 8007

public static final int STATUS_CONNECTION_REJECTED

The remote endpoint rejected the connection request.

Constant Value: 8004

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 Connections.disconnectFromEndpoint(GoogleApiClient, String).

Constant Value: 8012

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

public static final int STATUS_ERROR

The operation failed, without any more information.

Constant Value: 13

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

public static final int STATUS_NOT_CONNECTED_TO_ENDPOINT

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

Constant Value: 8005

public static final int STATUS_OK

The operation was successful.

Constant Value: 0

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

public static final int STATUS_PAYLOAD_IO_ERROR

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

Constant Value: 8013

public static final int STATUS_RADIO_ERROR

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

Constant Value: 8007

Public Methods

public static String getStatusCodeString (int statusCode)

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