Created
June 7, 2012 06:56
-
-
Save aaronpearce/2887031 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CookieSyncManager.createInstance(getApplicationContext()); | |
CookieManager mgr = CookieManager.getInstance(); | |
List<Cookie> cookies = ((AbstractHttpClient) httpClient).getCookieStore().getCookies(); | |
if(cookies != null) | |
{ | |
for(Cookie cookie : cookies) | |
{ | |
String cookieString = cookie.getName() + "=" + cookie.getValue() + "; domain=" + cookie.getDomain(); | |
mgr.setCookie(cookie.getDomain(), cookieString); | |
} | |
} | |
CookieSyncManager.getInstance().sync(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment