public abstract class

PayloadCallback

extends Object
java.lang.Object
   ↳ com.google.android.gms.nearby.connection.PayloadCallback

Class Overview

Listener for incoming/outgoing Payloads between connected endpoints.

Summary

Public Constructors
PayloadCallback()
Public Methods
abstract void onPayloadReceived(String endpointId, Payload payload)
Called when a Payload is received from a remote endpoint.
abstract void onPayloadTransferUpdate(String endpointId, PayloadTransferUpdate update)
Called with progress information about an active Payload transfer, either incoming or outgoing.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public PayloadCallback ()

Public Methods

public abstract void onPayloadReceived (String endpointId, Payload payload)

Called when a Payload is received from a remote endpoint. Depending on the type of the Payload, all of the data may or may not have been received at the time of this call. Use onPayloadTransferUpdate(String, PayloadTransferUpdate) to get updates on the status of the data received.

Parameters
endpointId String: The identifier for the remote endpoint that sent the payload.
payload Payload: The Payload object received.

public abstract void onPayloadTransferUpdate (String endpointId, PayloadTransferUpdate update)

Called with progress information about an active Payload transfer, either incoming or outgoing.

Parameters
endpointId String: The identifier for the remote endpoint that is sending or receiving this payload.
update PayloadTransferUpdate: The PayloadTransferUpdate describing the status of the transfer.