remove All Cookies - Android Network

Android examples for Network:Cookie

Description

remove All Cookies

Demo Code


//package com.java2s;

import android.content.Context;
import android.webkit.CookieManager;
import android.webkit.CookieSyncManager;

public class Main {
    public static void removeAllCookies(Context context) {
        CookieSyncManager.createInstance(context);
        CookieManager cookieManager = CookieManager.getInstance();
        cookieManager.removeAllCookie();
    }/*from   w  w w  .  ja  va  2 s. com*/
}

Related Tutorials