다음을 통해 공유


DiscoverySession.InitiateBootstrappingRequest Method

Definition

Initiate a Wi-Fi Aware bootstrapping setup request to create a pairing with the target peer.

[Android.Runtime.Register("initiateBootstrappingRequest", "(Landroid/net/wifi/aware/PeerHandle;I)V", "GetInitiateBootstrappingRequest_Landroid_net_wifi_aware_PeerHandle_IHandler", ApiSince=34)]
public virtual void InitiateBootstrappingRequest (Android.Net.Wifi.Aware.PeerHandle peerHandle, Android.Net.Wifi.Aware.AwarePairingBootstrappingMethods method);
[<Android.Runtime.Register("initiateBootstrappingRequest", "(Landroid/net/wifi/aware/PeerHandle;I)V", "GetInitiateBootstrappingRequest_Landroid_net_wifi_aware_PeerHandle_IHandler", ApiSince=34)>]
abstract member InitiateBootstrappingRequest : Android.Net.Wifi.Aware.PeerHandle * Android.Net.Wifi.Aware.AwarePairingBootstrappingMethods -> unit
override this.InitiateBootstrappingRequest : Android.Net.Wifi.Aware.PeerHandle * Android.Net.Wifi.Aware.AwarePairingBootstrappingMethods -> unit

Parameters

peerHandle
PeerHandle

The peer's handle for the pairing request. Must be a result of an DiscoverySessionCallback#onServiceDiscovered(ServiceDiscoveryInfo) or DiscoverySessionCallback#onMessageReceived(PeerHandle, byte[]) events.

method
AwarePairingBootstrappingMethods

one of the AwarePairingConfig#PAIRING_BOOTSTRAPPING_ values, should be one of the methods received from ServiceDiscoveryInfo#getPairingConfig()AwarePairingConfig#getBootstrappingMethods()

Attributes

Remarks

Initiate a Wi-Fi Aware bootstrapping setup request to create a pairing with the target peer. The Aware bootstrapping request should be done in the context of a discovery session - after a publish/subscribe DiscoverySessionCallback#onServiceDiscovered(ServiceDiscoveryInfo) event is received. The peer will check if the method can be fulfilled by AwarePairingConfig.Builder#setBootstrappingMethods(int) When the Aware Bootstrapping setup finished, both side will receive DiscoverySessionCallback#onBootstrappingSucceeded(PeerHandle, int)

Java documentation for android.net.wifi.aware.DiscoverySession.initiateBootstrappingRequest(android.net.wifi.aware.PeerHandle, int).

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