Udostępnij za pośrednictwem


WebSettings.GetDefaultUserAgent(Context) Method

Definition

Returns the default User-Agent used by a WebView.

[Android.Runtime.Register("getDefaultUserAgent", "(Landroid/content/Context;)Ljava/lang/String;", "")]
public static string? GetDefaultUserAgent (Android.Content.Context? context);
[<Android.Runtime.Register("getDefaultUserAgent", "(Landroid/content/Context;)Ljava/lang/String;", "")>]
static member GetDefaultUserAgent : Android.Content.Context -> string

Parameters

context
Context

a Context object used to access application assets

Returns

Attributes

Remarks

Returns the default User-Agent used by a WebView. An instance of WebView could use a different User-Agent if a call is made to WebSettings#setUserAgentString(String).

Java documentation for android.webkit.WebSettings.getDefaultUserAgent(android.content.Context).

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