반응형
webView.clearCache(true);
webView.clearHistory();
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
CookieSyncManager cookieSyncMngr=CookieSyncManager.createInstance(MainActivity.this);
cookieSyncMngr.startSync();
CookieManager cookieManager=CookieManager.getInstance();
cookieManager.removeAllCookie();
cookieManager.removeSessionCookie();
cookieSyncMngr.stopSync();
cookieSyncMngr.sync();
}else {
CookieManager cookieManager = CookieManager.getInstance();
cookieManager.removeAllCookies(new ValueCallback() {
@Override
public void onReceiveValue(Boolean value) {
Log.d("onReceiveValue", value.toString());
}
});
cookieManager.getInstance().flush();
}
반응형
'개발 > 안드로이드' 카테고리의 다른 글
안드로이드 12 변경사항 (0) | 2022.02.14 |
---|---|
안드로이드 Q - 새로운 저장소 정책, Scoped Storage 알아보기 (0) | 2020.07.30 |
안드로이드 스튜디오 메모리 설정 (0) | 2020.05.18 |
Invoke-customs are only supported starting with Android O (--min-api 26) (0) | 2020.05.17 |
안드로이드 10 고유식별자 (0) | 2020.04.28 |
댓글