Sdílet prostřednictvím


CookieManager.SetAcceptCookie(Boolean) Method

Definition

Sets whether the application's WebView instances should send and accept cookies.

[Android.Runtime.Register("setAcceptCookie", "(Z)V", "GetSetAcceptCookie_ZHandler")]
public abstract void SetAcceptCookie (bool accept);
[<Android.Runtime.Register("setAcceptCookie", "(Z)V", "GetSetAcceptCookie_ZHandler")>]
abstract member SetAcceptCookie : bool -> unit

Parameters

accept
Boolean

whether WebView instances should send and accept cookies

Attributes

Remarks

Sets whether the application's WebView instances should send and accept cookies. By default this is set to true and the WebView accepts cookies.

When this is trueCookieManager#setAcceptThirdPartyCookies setAcceptThirdPartyCookies and CookieManager#setAcceptFileSchemeCookies setAcceptFileSchemeCookies can be used to control the policy for those specific types of cookie.

Java documentation for android.webkit.CookieManager.setAcceptCookie(boolean).

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