java.lang.Object | ||
↳ | com.google.android.gms.common.api.CommonStatusCodes | |
↳ | com.google.android.gms.nearby.connection.ConnectionsStatusCodes |
Status codes for nearby connections results.
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 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns an untranslated debug (not user-friendly!) string based on the current status code.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
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
.
The ACCESS_COARSE_LOCATION
permission is required.
The ACCESS_WIFI_STATE
permission is required.
The BLUETOOTH
permission is required.
The BLUETOOTH_ADMIN
permission is required.
The CHANGE_WIFI_STATE
permission is required.
The RECORD_AUDIO
permission is required.
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.
The app is already advertising; call stopAdvertising() before trying to advertise again.
The app is already connected to the specified endpoint. Multiple connections to a remote endpoint cannot be maintained simultaneously.
The app is already discovering the specified application ID; call stopDiscovery() before trying to advertise again.
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.
There was an error trying to use the phone's Bluetooth capabilities.
The remote endpoint rejected the connection request.
An attempt to read from/write to a connected remote endpoint failed. If this occurs repeatedly,
consider invoking disconnectFromEndpoint(GoogleApiClient, String)
.
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).
The operation failed, without any more information.
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.
The remote endpoint is not connected; messages cannot be sent to it.
The operation was successful.
The app called an API method out of order (i.e. another method is expected to be called first).
Returns an untranslated debug (not user-friendly!) string based on the current status code.
Parameters | |
---|---|
statusCode |
int
|
Returns | |
---|---|
String |