to top
Android APIs
public class

WifiP2pDnsSdServiceRequest

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

Summary

[Expand]
Inherited Constants
From interface android.os.Parcelable
Public Methods
static WifiP2pDnsSdServiceRequest newInstance(String serviceType)
Create a service discovery to search for Bonjour services with the specified service type.
static WifiP2pDnsSdServiceRequest newInstance()
Create a service discovery request to search all Bonjour services.
static WifiP2pDnsSdServiceRequest newInstance(String instanceName, String serviceType)
Create a service discovery request to get the TXT data from the specified Bonjour service.
[Expand]
Inherited Methods
From class android.net.wifi.p2p.nsd.WifiP2pServiceRequest
From class java.lang.Object
From interface android.os.Parcelable

Public Methods

public static WifiP2pDnsSdServiceRequest newInstance (String serviceType)

Added in API level 16

Create a service discovery to search for Bonjour services with the specified service type.

Parameters
serviceType service type. Cannot be null
"_afpovertcp._tcp."(Apple File Sharing over TCP)
"_ipp._tcp" (IP Printing over TCP)
"_http._tcp" (http service)
Returns
  • service request for DnsSd.

public static WifiP2pDnsSdServiceRequest newInstance ()

Added in API level 16

Create a service discovery request to search all Bonjour services.

Returns
  • service request for Bonjour.

public static WifiP2pDnsSdServiceRequest newInstance (String instanceName, String serviceType)

Added in API level 16

Create a service discovery request to get the TXT data from the specified Bonjour service.

Parameters
instanceName instance name. Cannot be null.
"MyPrinter"
serviceType service type. Cannot be null.
e.g)
"_afpovertcp._tcp"(Apple File Sharing over TCP)
"_ipp._tcp" (IP Printing over TCP)
Returns
  • service request for Bonjour.