remove Session Cookie - Android Network

Android examples for Network:Cookie

Description

remove Session Cookie

Demo Code


//package com.java2s;
import android.content.Context;
import android.webkit.CookieManager;
import android.webkit.CookieSyncManager;

public class Main {
    public static void removeSessionCookie(Context context) {
        if (context != null) {
            CookieSyncManager.createInstance(context);
            CookieSyncManager.getInstance().startSync();
            CookieManager.getInstance().removeSessionCookie();
        }//from   w w w . j a  va  2  s. c  o  m
    }
}

Related Tutorials