WebSettings.UserAgent Property
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.
Caution
deprecated
Gets the user-agent as an integer code. -or- Sets the user-agent string using an integer code.
[System.Obsolete("deprecated")]
public virtual int UserAgent { [Android.Runtime.Register("getUserAgent", "()I", "GetGetUserAgentHandler")] get; [Android.Runtime.Register("setUserAgent", "(I)V", "GetSetUserAgent_IHandler")] set; }
[<System.Obsolete("deprecated")>]
[<get: Android.Runtime.Register("getUserAgent", "()I", "GetGetUserAgentHandler")>]
[<set: Android.Runtime.Register("setUserAgent", "(I)V", "GetSetUserAgent_IHandler")>]
member this.UserAgent : int with get, set
Property Value
the integer code for the user-agent string
- Attributes
Remarks
Property getter documentation:
Gets the user-agent as an integer code. <ul> <li>-1 means the WebView is using a custom user-agent string set with #setUserAgentString
</li> <li>0 means the WebView should use an Android user-agent string</li> <li>1 means the WebView should use a desktop user-agent string</li> </ul>
This member is deprecated. Please use #getUserAgentString
instead.
Java documentation for android.webkit.WebSettings.getUserAgent()
.
Property setter documentation:
Sets the user-agent string using an integer code. <ul> <li>0 means the WebView should use an Android user-agent string</li> <li>1 means the WebView should use a desktop user-agent string</li> </ul> Other values are ignored. The default is an Android user-agent string, i.e. code value 0.
This member is deprecated. Please use #setUserAgentString
instead.
Java documentation for android.webkit.WebSettings.setUserAgent(int)
.
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.