CookieManager

24 篇文章 0 订阅
22 篇文章 0 订阅

From: http://developer.android.com/reference/android/webkit/CookieManager.html

public class

CookieManager
 extends Objectjava.lang.Object
   ↳    android.webkit.CookieManager

Class Overview

Manages the cookies used by an application's WebView instances. Cookies are manipulated according to RFC2109.


SummaryPublic Methods :

 synchronized boolean     acceptCookie()

 Gets whether the application's WebView instances send and accept cookies.
 boolean     acceptThirdPartyCookies(WebView webview)
 Gets whether the WebView should allow third party cookies to be set.
 static boolean     allowFileSchemeCookies()
 Gets whether the application's WebView instances send and accept cookies for file scheme URLs.
 void     flush()
 Ensures all cookies currently accessible through the getCookie API are written to persistent storage.
String     getCookie(String url)
 Gets the cookies for the given URL.
 synchronized static CookieManager     getInstance()
 Gets the singleton CookieManager instance.
 synchronized boolean     hasCookies()
 Gets whether there are stored cookies.
 void     removeAllCookie()
 This method was deprecated in API level 21. Use removeAllCookies(ValueCallback) instead.
 void     removeAllCookies(ValueCallback<Boolean> callback)
 Removes all cookies.
 void     removeExpiredCookie()
 This method was deprecated in API level 21. The WebView handles removing expired cookies automatically.
 void     removeSessionCookie()
 This method was deprecated in API level 21. use removeSessionCookies(ValueCallback) instead.
 void     removeSessionCookies(ValueCallback<Boolean> callback)
 Removes all session cookies, which are cookies without an expiration date.
 synchronized void     setAcceptCookie(boolean accept)
 Sets whether the application's WebView instances should send and accept cookies.
 static void     setAcceptFileSchemeCookies(boolean accept)
 Sets whether the application's WebView instances should send and accept cookies for file scheme URLs.
 void     setAcceptThirdPartyCookies(WebView webview, boolean accept)
 Sets whether the WebView should allow third party cookies to be set.
 void     setCookie(String url, String value, ValueCallback<Boolean> callback)
 Sets a cookie for the given URL.
 void     setCookie(String url, String value)
 Sets a cookie for the given URL.
Protected Methods
Object     clone()
 Creates and returns a copy of this Object.
[Expand]
Inherited Methods
 From class java.lang.Object
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值