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
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 | This constant was 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 | 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 was 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. |
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
.
public static final int MISSING_PERMISSION_ACCESS_COARSE_LOCATION
The
ACCESS_COARSE_LOCATION
permission is required.
public static final int MISSING_PERMISSION_ACCESS_WIFI_STATE
The ACCESS_WIFI_STATE
permission is required.
public static final int MISSING_PERMISSION_BLUETOOTH
The BLUETOOTH
permission is required.
public static final int MISSING_PERMISSION_BLUETOOTH_ADMIN
The BLUETOOTH_ADMIN
permission is required.
public static final int MISSING_PERMISSION_CHANGE_WIFI_STATE
The CHANGE_WIFI_STATE
permission is required.
public static final int MISSING_PERMISSION_RECORD_AUDIO
The RECORD_AUDIO
permission is required.
public static final int MISSING_SETTING_LOCATION_MUST_BE_ON
This constant was deprecated.
This status code is no longer returned.
Location must be turned on (needed for Wifi scans starting from Android M), preferably using //developers.google.com/android/reference/com/google/android/gms/location/SettingsApi.
public static final int STATUS_ALREADY_ADVERTISING
The app is already advertising; call stopAdvertising() before trying to advertise again.
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.
public static final int STATUS_ALREADY_DISCOVERING
The app is already discovering the specified application ID; call stopDiscovery() before trying to advertise again.
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.
public static final int STATUS_BLUETOOTH_ERROR
There was an error trying to use the phone's Bluetooth capabilities.
public static final int STATUS_CONNECTION_REJECTED
The remote endpoint rejected the connection request.
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)
.
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).
public static final int STATUS_ERROR
The operation failed, without any more information.
public static final int STATUS_NETWORK_NOT_CONNECTED
This constant was 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.
public static final int STATUS_NOT_CONNECTED_TO_ENDPOINT
The remote endpoint is not connected; messages cannot be sent to it.
public static final int STATUS_OK
The operation was successful.
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).
Public Methods
public static String getStatusCodeString (int statusCode)
Returns an untranslated debug (not user-friendly!) string based on the current status code.