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


A class for creating a Bonjour service discovery request for use with addServiceRequest(WifiP2pManager.Channel, WifiP2pServiceRequest, WifiP2pManager.ActionListener) and removeServiceRequest(WifiP2pManager.Channel, WifiP2pServiceRequest, WifiP2pManager.ActionListener)

See also:

Summary

Inherited constants

From interface android.os.Parcelable

Public methods

static WifiP2pDnsSdServiceRequest newInstance()

Create a service discovery request to search all Bonjour services.

static WifiP2pDnsSdServiceRequest newInstance(String serviceType)

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

static WifiP2pDnsSdServiceRequest newInstance(String instanceName, String serviceType)

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

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 ()

Create a service discovery request to search all Bonjour services.

Returns
WifiP2pDnsSdServiceRequest service request for Bonjour.

newInstance

Added in API level 16
WifiP2pDnsSdServiceRequest newInstance (String serviceType)

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

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)

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

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!