NsdServiceInfo.Hostname Property

Definition

Get the hostname.

public string? Hostname { [Android.Runtime.Register("getHostname", "()Ljava/lang/String;", "", ApiSince=36)] get; }
[<get: Android.Runtime.Register("getHostname", "()Ljava/lang/String;", "", ApiSince=36)>]
member this.Hostname : string

Property Value

Attributes

Remarks

Get the hostname.

When a service is resolved through NsdManager#resolveService or NsdManager#registerServiceInfoCallback, this returns the hostname of the resolved service. In all other cases, this will be null. The top level ___domain ".local." is omitted. For example, this returns "MyHost" when the service's hostname is "MyHost.local.".

Java documentation for android.net.nsd.NsdServiceInfo.getHostname().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to