Added in API level 16

WifiP2pDnsSdServiceInfo


open class WifiP2pDnsSdServiceInfo : WifiP2pServiceInfo

A class for storing Bonjour service information that is advertised over a Wi-Fi peer-to-peer setup. {@see android.net.wifi.p2p.WifiP2pManager#addLocalService} {@see android.net.wifi.p2p.WifiP2pManager#removeLocalService} {@see WifiP2pServiceInfo} {@see WifiP2pUpnpServiceInfo}

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.

Int SERVICE_TYPE_ALL

All service protocol types.

Int SERVICE_TYPE_BONJOUR

DNS based service discovery protocol.

Int SERVICE_TYPE_UPNP

UPnP protocol.

Int SERVICE_TYPE_VENDOR_SPECIFIC

Vendor Specific protocol

Public methods
open static WifiP2pDnsSdServiceInfo!
newInstance(instanceName: String!, serviceType: String!, txtMap: MutableMap<String!, String!>!)

Create a Bonjour service information object.

Inherited functions
Int describeContents()

Implement the Parcelable interface {@hide}

Boolean equals(other: Any?)

WifiP2pUsdBasedServiceConfig? getWifiP2pUsdBasedServiceConfig()

Get the service information configured to advertise using un-synchronized service discovery (USD) protocol. See WifiP2pServiceInfo(android.net.wifi.p2p.nsd.WifiP2pUsdBasedServiceConfig)

Int hashCode()

Unit writeToParcel(dest: Parcel, flags: Int)

Implement the Parcelable interface {@hide}

Public methods

newInstance

Added in API level 16
open static fun newInstance(
    instanceName: String!,
    serviceType: String!,
    txtMap: MutableMap<String!, String!>!
): WifiP2pDnsSdServiceInfo!

Create a Bonjour service information object.

Parameters
instanceName String!: instance name.
e.g) "MyPrinter"
serviceType String!: service type.
e.g) "_ipp._tcp"
txtMap MutableMap<String!, String!>!: TXT record with key/value pair in a map confirming to format defined at http://files.dns-sd.org/draft-cheshire-dnsext-dns-sd.txt
Return
WifiP2pDnsSdServiceInfo! Bonjour service information object