由于app有网页,同步登陆状态。
CookieSyncManager.createInstance(this);
CookieManager cookieManager = CookieManager.getInstance();
cookieManager.setAcceptCookie(true);
cookieManager.removeAllCookie();
String cookieMustHas = "cok_framename=1;Domain=xxx.com;Path=/";
String username = "username=" + user_name;
String userpass = "userpass=" + user_pass;
cookieManager.setCookie(url, cookieString);
cookieManager.setCookie(url, memberString);
cookieManager.setCookie(url, passString);
记得每次的key-value都要分开setCookie(),我也不知道怎么回事,先记录