Connections.ConnectionResponseCallback | Android Developers

Quicknav Quicknav
Links

- Google Play Developer Console
- Android Developers Blog
- About Android

Android Sites

- Android.com
- Android Developers
- Android Open Source Project

Language
close

- - About
  - Wear
  - TV
  - Auto
- - Get Started
  - Devices
  - Style
  - Patterns
  - Building Blocks
  - Downloads
  - Videos
- - Training
  - API Guides
  - Reference
  - Tools
  - Google Services
  - Samples
- - Google Play
  - Essentials
  - Get Users
  - Engage & Retain
  - Monetize
  - Analyze
  - Tools & Reference
  - Developer Stories

## Results

Loading...
public static interface

# Connections.ConnectionResponseCallback

com.google.android.gms.nearby.connection.Connections.ConnectionResponseCallback

## Class Overview

Callback for responses to connection requests.

## Summary

Public Methods
abstract void | onConnectionResponse(String remoteEndpointId, Status status, byte[] payload) Called when a response is received for a connection request.

## Public Methods

#### public abstract void onConnectionResponse (String remoteEndpointId, Status status, byte[] payload)

Called when a response is received for a connection request.

##### Parameters

remoteEndpointId | The identifier for the remote endpoint that sent the response.
status | The status of the response. Valid values are `STATUS_OK`, `STATUS_CONNECTION_REJECTED`, and `STATUS_NOT_CONNECTED_TO_ENDPOINT`.
payload | Bytes of a custom message provided in the connection response (on success). This array will not exceed `MAX_RELIABLE_MESSAGE_LEN` bytes in length.