Java tutorial
//package com.java2s; import android.content.Context; import android.webkit.CookieManager; import android.webkit.CookieSyncManager; public class Main { public static String getCookieValue(Context context, String url, String key) { CookieSyncManager csm = CookieSyncManager.createInstance(context); CookieManager cookieManager = CookieManager.getInstance(); csm.sync(); String cookieStr = cookieManager.getCookie(url); System.out.println("========cookied:" + cookieStr); String[] strs = cookieStr.split(";"); String value = null; for (String string : strs) { if (string.trim().startsWith(key)) { value = string.substring(string.indexOf("=") + 1); break; } } return value; } }