Android examples for Network:Cookie
get Cookie using CookieManager
//package com.java2s; import android.webkit.CookieManager; public class Main { public static String getCookie(String siteName, String CookieName) { String CookieValue = null; CookieManager cookieManager = CookieManager.getInstance(); String cookies = cookieManager.getCookie(siteName); if (cookies == null) { return null; }//from ww w . j a v a 2 s. c o m String[] temp = cookies.split(";"); for (String ar1 : temp) { if (ar1.contains(CookieName)) { String[] temp1 = ar1.split("="); CookieValue = temp1[1]; } } return CookieValue; } }