Added in API level Baklava
Builder
class Builder
kotlin.Any | |
↳ | android.net.nsd.AdvertisingRequest.Builder |
A builder for creating new AdvertisingRequest
objects.
Summary
Public constructors | |
---|---|
Builder(serviceInfo: NsdServiceInfo) Creates a new |
Public methods | |
---|---|
AdvertisingRequest |
build() Creates a new |
AdvertisingRequest.Builder |
Sets advertising configuration flags. |
AdvertisingRequest.Builder |
setProtocolType(protocolType: Int) Sets the protocol to use for advertising. |
Public constructors
Builder
Added in API level Baklava
Builder(serviceInfo: NsdServiceInfo)
Creates a new Builder
object.
Parameters | |
---|---|
serviceInfo |
NsdServiceInfo: the NsdServiceInfo describing the service to advertise. This value cannot be null . |
Public methods
build
Added in API level Baklava
fun build(): AdvertisingRequest
Creates a new AdvertisingRequest
object.
Return | |
---|---|
AdvertisingRequest |
This value cannot be null . |
setFlags
Added in API level Baklava
fun setFlags(flags: Long): AdvertisingRequest.Builder
Sets advertising configuration flags.
Parameters | |
---|---|
flags |
Long: flags to use for advertising. Value is either 0 or android.net.nsd.AdvertisingRequest#FLAG_SKIP_PROBING |
Return | |
---|---|
AdvertisingRequest.Builder |
This value cannot be null . |
setProtocolType
Added in API level Baklava
fun setProtocolType(protocolType: Int): AdvertisingRequest.Builder
Sets the protocol to use for advertising.
Parameters | |
---|---|
protocolType |
Int: the advertising protocol to use. Value is android.net.nsd.NsdManager#PROTOCOL_DNS_SD |
Return | |
---|---|
AdvertisingRequest.Builder |
This value cannot be null . |