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)
Inherited constants |
|---|
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) |
|
|---|---|
android.net.wifi.p2p.nsd.WifiP2pServiceRequest
|
|
java.lang.Object
|
|
android.os.Parcelable
|
|
WifiP2pDnsSdServiceRequest newInstance ()
创建服务发现请求以搜索所有Bonjour服务。
| 返回(Returns) | |
|---|---|
WifiP2pDnsSdServiceRequest |
service request for Bonjour. |
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. |
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. |