DiscoveryRequest.Builder.SetSubtype(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets the optional subtype of the services to discover.
[Android.Runtime.Register("setSubtype", "(Ljava/lang/String;)Landroid/net/nsd/DiscoveryRequest$Builder;", "", ApiSince=35)]
public Android.Net.Nsd.DiscoveryRequest.Builder SetSubtype(string? subtype);
[<Android.Runtime.Register("setSubtype", "(Ljava/lang/String;)Landroid/net/nsd/DiscoveryRequest$Builder;", "", ApiSince=35)>]
member this.SetSubtype : string -> Android.Net.Nsd.DiscoveryRequest.Builder
Parameters
- subtype
- String
The subtype label, such as _printer, without the trailing ._sub; or null to omit or clear subtype filtering. An empty string is invalid and causes discovery to fail with a bad-parameter error.
Returns
This builder, with the discovery subtype set.
- Attributes
Remarks
A nonempty subtype must start with an underscore. For example, use _printer for _printer._sub._http._tcp, with _http._tcp as the service type. Discovery then queries that subtype instead of all services of the base type. An invalid subtype causes discovery to fail with a bad-parameter error.
Android 16 source for DiscoveryRequest.Builder.setSubtype.