Android.Net.Wifi.P2p Namespace

Provides classes to create peer-to-peer (P2P) connections with Wi-Fi Direct.

Remarks

Provides classes to create peer-to-peer (P2P) connections with Wi-Fi Direct.

Using these APIs, you can discover and connect to other devices when each device supports Wi-Fi Direct, then communicate over a speedy connection across distances much longer than a Bluetooth connection. The primary class you need to work with is Android.Net.Wifi.P2p.WifiP2pManager, which you can acquire by calling Android.App.Activity.getSystemService(java.lang.String). The Android.Net.Wifi.P2p.WifiP2pManager includes APIs that allow you to:

Several other interfaces and classes are necessary as well, such as:

In order to use the Wi-Fi P2P APIs, your app must request the following user permissions:

For example code, see the Wi-Fi Direct Demo sample application.

Note: Not all Android-powered devices support Wi-Fi Direct. If your application uses Wi-Fi Direct, declare so with a <uses-feature> element in the manifest file:

xml Example

<manifest ...>
    <uses-feature android:name="android.hardware.wifi.direct" />
    ...
</manifest>

Classes

TypeReason
WifiP2pConfigA class representing a Wi-Fi P2p configuration for setting up a connection
See Also
WifiP2pConfig+InterfaceConstsDocumentation for this section has not yet been entered.
WifiP2pDeviceA class representing a Wi-Fi p2p device Note that the operations are not thread safe
See Also
WifiP2pDevice+InterfaceConstsDocumentation for this section has not yet been entered.
WifiP2pDeviceListA class representing a Wi-Fi P2p device list.
WifiP2pDeviceList+InterfaceConstsDocumentation for this section has not yet been entered.
WifiP2pDeviceStateEnumerates values returned by several types.
WifiP2pFailureReasonEnumerates values returned by several types and taken as a parameter of the Android.Net.Wifi.P2p.WifiP2pManager.FailureEventArgs..ctor, and Android.Net.Wifi.P2p.WifiP2pManager.IActionListener.OnFailure members.
WifiP2pGroupA class representing a Wi-Fi P2p group.
WifiP2pGroup+InterfaceConstsDocumentation for this section has not yet been entered.
WifiP2pInfoA class representing connection information about a Wi-Fi p2p group
See Also
WifiP2pInfo+InterfaceConstsDocumentation for this section has not yet been entered.
WifiP2pManagerThis class provides the API for managing Wi-Fi peer-to-peer connectivity.
WifiP2pManager+ChannelA channel that connects the application to the Wifi p2p framework.
WifiP2pManager+ConnectionInfoEventArgsDocumentation for this section has not yet been entered.
WifiP2pManager+DnsSdServiceResponseEventArgsDocumentation for this section has not yet been entered.
WifiP2pManager+DnsSdTxtRecordEventArgsDocumentation for this section has not yet been entered.
WifiP2pManager+FailureEventArgsDocumentation for this section has not yet been entered.
WifiP2pManager+GroupInfoEventArgsDocumentation for this section has not yet been entered.
WifiP2pManager+IActionListenerInterface for callback invocation on an application action
WifiP2pManager+IChannelListenerInterface for callback invocation when framework channel is lost
WifiP2pManager+IConnectionInfoListenerInterface for callback invocation when connection info is available
WifiP2pManager+IDnsSdServiceResponseListenerInterface for callback invocation when Bonjour service discovery response is received
WifiP2pManager+IDnsSdTxtRecordListenerInterface for callback invocation when Bonjour TXT record is available for a service
WifiP2pManager+IGroupInfoListenerInterface for callback invocation when group info is available
WifiP2pManager+IPeerListListenerInterface for callback invocation when peer list is available
WifiP2pManager+IUpnpServiceResponseListenerInterface for callback invocation when upnp service discovery response is received
WifiP2pManager+PeerListEventArgsDocumentation for this section has not yet been entered.
WifiP2pManager+UpnpServiceResponseEventArgsDocumentation for this section has not yet been entered.
WifiP2pStateEnumerates values returned by several types.