Freigeben über


WifiP2pManager.AddLocalService Method

Definition

Register a local service for service discovery.

[Android.Runtime.Register("addLocalService", "(Landroid/net/wifi/p2p/WifiP2pManager$Channel;Landroid/net/wifi/p2p/nsd/WifiP2pServiceInfo;Landroid/net/wifi/p2p/WifiP2pManager$ActionListener;)V", "GetAddLocalService_Landroid_net_wifi_p2p_WifiP2pManager_Channel_Landroid_net_wifi_p2p_nsd_WifiP2pServiceInfo_Landroid_net_wifi_p2p_WifiP2pManager_ActionListener_Handler")]
public virtual void AddLocalService (Android.Net.Wifi.P2p.WifiP2pManager.Channel? channel, Android.Net.Wifi.P2p.Nsd.WifiP2pServiceInfo? servInfo, Android.Net.Wifi.P2p.WifiP2pManager.IActionListener? listener);
[<Android.Runtime.Register("addLocalService", "(Landroid/net/wifi/p2p/WifiP2pManager$Channel;Landroid/net/wifi/p2p/nsd/WifiP2pServiceInfo;Landroid/net/wifi/p2p/WifiP2pManager$ActionListener;)V", "GetAddLocalService_Landroid_net_wifi_p2p_WifiP2pManager_Channel_Landroid_net_wifi_p2p_nsd_WifiP2pServiceInfo_Landroid_net_wifi_p2p_WifiP2pManager_ActionListener_Handler")>]
abstract member AddLocalService : Android.Net.Wifi.P2p.WifiP2pManager.Channel * Android.Net.Wifi.P2p.Nsd.WifiP2pServiceInfo * Android.Net.Wifi.P2p.WifiP2pManager.IActionListener -> unit
override this.AddLocalService : Android.Net.Wifi.P2p.WifiP2pManager.Channel * Android.Net.Wifi.P2p.Nsd.WifiP2pServiceInfo * Android.Net.Wifi.P2p.WifiP2pManager.IActionListener -> unit

Parameters

servInfo
WifiP2pServiceInfo

is a local service information.

listener
WifiP2pManager.IActionListener

for callbacks on success or failure. Can be null.

Attributes

Remarks

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