Added in API level 16

WifiP2pDnsSdServiceRequest


open class WifiP2pDnsSdServiceRequest : WifiP2pServiceRequest

A class for creating a Bonjour service discovery request for use with WifiP2pManager.addServiceRequest and WifiP2pManager.removeServiceRequest {@see WifiP2pManager} {@see WifiP2pServiceRequest} {@see WifiP2pUpnpServiceRequest}

Summary

Inherited constants
Int CONTENTS_FILE_DESCRIPTOR

Descriptor bit used with describeContents(): indicates that the Parcelable object's flattened representation includes a file descriptor.

Int PARCELABLE_WRITE_RETURN_VALUE

Flag for use with writeToParcel: the object being written is a return value, that is the result of a function such as "Parcelable someFunction()", "void someFunction(out Parcelable)", or "void someFunction(inout Parcelable)". Some implementations may want to release resources at this point.

Public methods
open static WifiP2pDnsSdServiceRequest!

Create a service discovery request to search all Bonjour services.

open static WifiP2pDnsSdServiceRequest!
newInstance(serviceType: String!)

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

open static WifiP2pDnsSdServiceRequest!
newInstance(instanceName: String!, serviceType: String!)

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

Inherited functions
Int describeContents()

Implement the Parcelable interface {@hide}

Boolean equals(other: Any?)

WifiP2pUsdBasedServiceConfig? getWifiP2pUsdBasedServiceConfig()

/** Get the service information configured to discover a service using un-synchronized service discovery (USD) protocol. See WifiP2pServiceRequest(android.net.wifi.p2p.nsd.WifiP2pUsdBasedServiceConfig).

Int hashCode()

WifiP2pServiceRequest! newInstance(protocolType: Int)

Create a service discovery request.

WifiP2pServiceRequest! newInstance(protocolType: Int, queryData: String!)

Create a service discovery request.

Unit writeToParcel(dest: Parcel, flags: Int)

Implement the Parcelable interface {@hide}

Public methods

newInstance

Added in API level 16
open static fun newInstance(): WifiP2pDnsSdServiceRequest!

Create a service discovery request to search all Bonjour services.

Return
WifiP2pDnsSdServiceRequest! service request for Bonjour.

newInstance

Added in API level 16
open static fun newInstance(serviceType: String!): WifiP2pDnsSdServiceRequest!

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)
Return
WifiP2pDnsSdServiceRequest! service request for DnsSd.

newInstance

Added in API level 16
open static fun newInstance(
    instanceName: String!,
    serviceType: String!
): WifiP2pDnsSdServiceRequest!

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)
Return
WifiP2pDnsSdServiceRequest! service request for Bonjour.