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>
Type | Reason |
---|---|
WifiP2pConfig | A class representing a Wi-Fi P2p configuration for setting up a connection
See Also |
WifiP2pConfig+InterfaceConsts | Documentation for this section has not yet been entered. |
WifiP2pDevice | A class representing a Wi-Fi p2p device
Note that the operations are not thread safe
See Also |
WifiP2pDevice+InterfaceConsts | Documentation for this section has not yet been entered. |
WifiP2pDeviceList | A class representing a Wi-Fi P2p device list. |
WifiP2pDeviceList+InterfaceConsts | Documentation for this section has not yet been entered. |
WifiP2pDeviceState | Enumerates values returned by several types. |
WifiP2pFailureReason | Enumerates 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. |
WifiP2pGroup | A class representing a Wi-Fi P2p group. |
WifiP2pGroup+InterfaceConsts | Documentation for this section has not yet been entered. |
WifiP2pInfo | A class representing connection information about a Wi-Fi p2p group
See Also |
WifiP2pInfo+InterfaceConsts | Documentation for this section has not yet been entered. |
WifiP2pManager | This class provides the API for managing Wi-Fi peer-to-peer connectivity. |
WifiP2pManager+Channel | A channel that connects the application to the Wifi p2p framework. |
WifiP2pManager+ConnectionInfoEventArgs | Documentation for this section has not yet been entered. |
WifiP2pManager+DnsSdServiceResponseEventArgs | Documentation for this section has not yet been entered. |
WifiP2pManager+DnsSdTxtRecordEventArgs | Documentation for this section has not yet been entered. |
WifiP2pManager+FailureEventArgs | Documentation for this section has not yet been entered. |
WifiP2pManager+GroupInfoEventArgs | Documentation for this section has not yet been entered. |
WifiP2pManager+IActionListener | Interface for callback invocation on an application action |
WifiP2pManager+IChannelListener | Interface for callback invocation when framework channel is lost |
WifiP2pManager+IConnectionInfoListener | Interface for callback invocation when connection info is available |
WifiP2pManager+IDnsSdServiceResponseListener | Interface for callback invocation when Bonjour service discovery response is received |
WifiP2pManager+IDnsSdTxtRecordListener | Interface for callback invocation when Bonjour TXT record is available for a service |
WifiP2pManager+IGroupInfoListener | Interface for callback invocation when group info is available |
WifiP2pManager+IPeerListListener | Interface for callback invocation when peer list is available |
WifiP2pManager+IUpnpServiceResponseListener | Interface for callback invocation when upnp service discovery response is received |
WifiP2pManager+PeerListEventArgs | Documentation for this section has not yet been entered. |
WifiP2pManager+UpnpServiceResponseEventArgs | Documentation for this section has not yet been entered. |
WifiP2pState | Enumerates values returned by several types. |