Share via


DiscoverySessionCallback.OnMessageReceived(PeerHandle, Byte[]) Method

Definition

Called when a message is received from a discovery session peer - in response to the peer's DiscoverySession#sendMessage(PeerHandle, int, byte[]).

[Android.Runtime.Register("onMessageReceived", "(Landroid/net/wifi/aware/PeerHandle;[B)V", "GetOnMessageReceived_Landroid_net_wifi_aware_PeerHandle_arrayBHandler", ApiSince=26)]
public virtual void OnMessageReceived (Android.Net.Wifi.Aware.PeerHandle? peerHandle, byte[]? message);
[<Android.Runtime.Register("onMessageReceived", "(Landroid/net/wifi/aware/PeerHandle;[B)V", "GetOnMessageReceived_Landroid_net_wifi_aware_PeerHandle_arrayBHandler", ApiSince=26)>]
abstract member OnMessageReceived : Android.Net.Wifi.Aware.PeerHandle * byte[] -> unit
override this.OnMessageReceived : Android.Net.Wifi.Aware.PeerHandle * byte[] -> unit

Parameters

peerHandle
PeerHandle

An opaque handle to the peer matching our discovery operation.

message
Byte[]

A byte array containing the message.

Attributes

Remarks

Called when a message is received from a discovery session peer - in response to the peer's DiscoverySession#sendMessage(PeerHandle, int, byte[]).

Java documentation for android.net.wifi.aware.DiscoverySessionCallback.onMessageReceived(android.net.wifi.aware.PeerHandle, byte[]).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to