Stay organized with collections
Save and categorize content based on your preferences.
DnsSdServiceResponseListener
interface DnsSdServiceResponseListener
Interface for callback invocation when Bonjour service discovery response is received
Summary
Public methods |
abstract Unit |
The requested Bonjour service response is available.
|
Public methods
onDnsSdServiceAvailable
abstract fun onDnsSdServiceAvailable(
instanceName: String!,
registrationType: String!,
srcDevice: WifiP2pDevice!
): Unit
The requested Bonjour service response is available.
This function is invoked when the device with the specified Bonjour registration type returned the instance name.
Parameters |
instanceName |
String!: instance name. e.g) "MyPrinter". |
registrationType |
String!: e.g) "_ipp._tcp.local." |
srcDevice |
WifiP2pDevice!: source device. |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# WifiP2pManager.DnsSdServiceResponseListener\n\nAdded in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nDnsSdServiceResponseListener\n============================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/net/wifi/p2p/WifiP2pManager.DnsSdServiceResponseListener \"View this page in Java\") \n\n```\ninterface DnsSdServiceResponseListener\n```\n\n|-----------------------------------------------------------------------|\n| [android.net.wifi.p2p.WifiP2pManager.DnsSdServiceResponseListener](#) |\n\nInterface for callback invocation when Bonjour service discovery response is received\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onDnsSdServiceAvailable](#onDnsSdServiceAvailable(kotlin.String,%20kotlin.String,%20android.net.wifi.p2p.WifiP2pDevice))`(`instanceName:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`, `registrationType:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`, `srcDevice:` `[WifiP2pDevice](/reference/kotlin/android/net/wifi/p2p/WifiP2pDevice)!`)` The requested Bonjour service response is available. |\n\nPublic methods\n--------------\n\n### onDnsSdServiceAvailable\n\nAdded in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onDnsSdServiceAvailable(\n instanceName: String!, \n registrationType: String!, \n srcDevice: WifiP2pDevice!\n): Unit\n```\n\nThe requested Bonjour service response is available.\n\nThis function is invoked when the device with the specified Bonjour registration type returned the instance name.\n\n| Parameters ||\n|--------------------|---------------------------------------------------------------------------------------------------------------------|\n| `instanceName` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!: instance name. e.g) \"MyPrinter\". |\n| `registrationType` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!: e.g) \"_ipp._tcp.local.\" |\n| `srcDevice` | [WifiP2pDevice](/reference/kotlin/android/net/wifi/p2p/WifiP2pDevice)!: source device. |"]]