Most visited

Recently visited

Added in API level 16

WifiP2pDnsSdServiceRequest

public class WifiP2pDnsSdServiceRequest
extends WifiP2pServiceRequest

java.lang.Object
    android.net.wifi.p2p.nsd.WifiP2pServiceRequest
      android.net.wifi.p2p.nsd.WifiP2pDnsSdServiceRequest


用于创建与 addServiceRequest(WifiP2pManager.Channel, WifiP2pServiceRequest, WifiP2pManager.ActionListener)removeServiceRequest(WifiP2pManager.Channel, WifiP2pServiceRequest, WifiP2pManager.ActionListener)使用的Bonjour服务发现请求的 removeServiceRequest(WifiP2pManager.Channel, WifiP2pServiceRequest, WifiP2pManager.ActionListener)

也可以看看:

摘要(Summary)

Inherited constants

From interface android.os.Parcelable

公共方法(Public methods)

static WifiP2pDnsSdServiceRequest newInstance()

创建服务发现请求以搜索所有Bonjour服务。

static WifiP2pDnsSdServiceRequest newInstance(String serviceType)

创建服务发现以搜索具有指定服务类型的Bonjour服务。

static WifiP2pDnsSdServiceRequest newInstance(String instanceName, String serviceType)

创建服务发现请求以从指定的Bonjour服务获取TXT数据。

继承方法(Inherited methods)

From class android.net.wifi.p2p.nsd.WifiP2pServiceRequest
From class java.lang.Object
From interface android.os.Parcelable

公共方法(Public methods)

newInstance

Added in API level 16
WifiP2pDnsSdServiceRequest newInstance ()

创建服务发现请求以搜索所有Bonjour服务。

返回(Returns)
WifiP2pDnsSdServiceRequest service request for Bonjour.

newInstance

Added in API level 16
WifiP2pDnsSdServiceRequest newInstance (String serviceType)

创建服务发现以搜索具有指定服务类型的Bonjour服务。

参数(Parameters)
serviceType String: service type. Cannot be null
"_afpovertcp._tcp."(Apple File Sharing over TCP)
"_ipp._tcp" (IP Printing over TCP)
"_http._tcp" (http service)
返回(Returns)
WifiP2pDnsSdServiceRequest service request for DnsSd.

newInstance

Added in API level 16
WifiP2pDnsSdServiceRequest newInstance (String instanceName, 
                String serviceType)

创建服务发现请求以从指定的Bonjour服务获取TXT数据。

参数(Parameters)
instanceName String: instance name. Cannot be null.
"MyPrinter"
serviceType String: service type. Cannot be null.
e.g)
"_afpovertcp._tcp"(Apple File Sharing over TCP)
"_ipp._tcp" (IP Printing over TCP)
返回(Returns)
WifiP2pDnsSdServiceRequest service request for Bonjour.

Hooray!