}
private void setWebViewCookie() {
CookieSyncManager.createInstance(this);
CookieManager cookieManager = CookieManager.getInstance();
cookieManager.removeAllCookie();
cookieManager.acceptCookie();
String cookie = new SharePreferenceUtil(this).getCookie();
if (!cookie.equals("")){
String[] cookiess = cookie.split("customkidswantsplit");
for (String cookies : cookiess){
cookieManager.setCookie(UrlUtil.HOST, cookies + ";Domain=" +UrlUtil.HOST);
// cookieManager.setCookie(UrlUtil.HOST, cookie + ";Domain=" +UrlUtil.HOST + ";Path=/");
}
}
CookieSyncManager.getInstance().sync();
}
volley只能拿到一个setCookie,需要修改源码才支持,所以这里不用volley 使用httpClient