WifiAwareNetworkSpecifier.Builder.Build Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Create a android.net.NetworkRequest.Builder#setNetworkSpecifier(NetworkSpecifier)
for a WiFi Aware connection (link) to the specified peer.
[Android.Runtime.Register("build", "()Landroid/net/wifi/aware/WifiAwareNetworkSpecifier;", "", ApiSince=29)]
public Android.Net.Wifi.Aware.WifiAwareNetworkSpecifier Build ();
[<Android.Runtime.Register("build", "()Landroid/net/wifi/aware/WifiAwareNetworkSpecifier;", "", ApiSince=29)>]
member this.Build : unit -> Android.Net.Wifi.Aware.WifiAwareNetworkSpecifier
Returns
A NetworkSpecifier
to be used to construct
android.net.NetworkRequest.Builder#setNetworkSpecifier(NetworkSpecifier)
to pass
to android.net.ConnectivityManager#requestNetwork(android.net.NetworkRequest,
android.net.ConnectivityManager.NetworkCallback)
[or other varieties of that API].
- Attributes
Remarks
Create a android.net.NetworkRequest.Builder#setNetworkSpecifier(NetworkSpecifier)
for a WiFi Aware connection (link) to the specified peer. The android.net.NetworkRequest.Builder#addTransportType(int)
should be set to android.net.NetworkCapabilities#TRANSPORT_WIFI_AWARE
.
The default builder constructor will initialize a NetworkSpecifier which requests an open (non-encrypted) link. To request an encrypted link use the #setPskPassphrase(String)
or #setPmk(byte[])
builder methods.
Java documentation for android.net.wifi.aware.WifiAwareNetworkSpecifier.Builder.build()
.
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.